Build and Deploy failing on VS - Following Getting Started

I’m following the Getting Started Guide (Visual Studio Extension For Torizon).

I have sucessfully:

  1. Loaded Torizon Connected to a Wifi Network with the iMX8
  2. SSH’d into the iMX8
  3. Installed VisualStudio, Docker, and the Torizon Extension

When I attempt to add the device to the “Torizon Devices” window, it detects the board, but doesn’t show any details under it. I did allow “moses” to access the network, and I have enabled the debug console for it. Here is the log:

Serving on http://kubernetes.docker.internal:5000
INFO:root:REST -> /api/version/docker
INFO:root:REST <- /api/version/docker - 200
INFO:root:REST -> /api/version/docker
INFO:root:REST <- /api/version/docker - 200
INFO:root:REST -> /api/applications/load
INFO:root:REST <- /api/applications/load - 200
INFO:root:REST -> /api/platforms
INFO:root:REST <- /api/platforms - 200
INFO:root:REST -> /api/applications/9badd7ae-1c6c-4d0c-b7f3-741d89479ef7/sdk/run
ERROR:root:(109, 'ReadFile', 'The pipe has been ended.')
Traceback (most recent call last):
  File "flask\app.py", line 1950, in full_dispatch_request
  File "flask\app.py", line 1936, in dispatch_request
  File "connexion\decorators\decorator.py", line 48, in wrapper
  File "connexion\decorators\uri_parsing.py", line 173, in wrapper
  File "connexion\decorators\validation.py", line 388, in wrapper
  File "connexion\decorators\parameter.py", line 126, in wrapper
  File "api.py", line 913, in applications_application_sdk_run_get
  File "applicationconfig.py", line 1286, in start_sdk_container
  File "docker\models\containers.py", line 880, in get
  File "docker\utils\decorators.py", line 19, in wrapped
  File "docker\api\container.py", line 758, in inspect_container
  File "docker\utils\decorators.py", line 46, in inner
  File "docker\api\client.py", line 230, in _get
  File "requests\sessions.py", line 543, in get
  File "requests\sessions.py", line 530, in request
  File "requests\sessions.py", line 685, in send
  File "requests\models.py", line 829, in content
  File "requests\models.py", line 751, in generate
  File "urllib3\response.py", line 560, in stream
  File "urllib3\response.py", line 752, in read_chunked
  File "urllib3\response.py", line 682, in _update_chunk_length
  File "docker\transport\npipesocket.py", line 209, in readinto
  File "docker\transport\npipesocket.py", line 22, in wrapped
  File "docker\transport\npipesocket.py", line 136, in recv_into
pywintypes.error: (109, 'ReadFile', 'The pipe has been ended.')
INFO:root:REST <- /api/applications/9badd7ae-1c6c-4d0c-b7f3-741d89479ef7/sdk/run - 500
INFO:root:REST -> /api/eulas
INFO:root:REST <- /api/eulas - 200
INFO:root:REST -> /api/devices
INFO:root:REST <- /api/devices - 200
INFO:root:REST -> /api/devices/06738478
INFO:root:REST <- /api/devices/06738478 - 200
INFO:root:REST -> /api/devices/06738478/images
INFO:root:SSH - Creating tunnel to 06738478
2020-11-21 02:50:57,167| ERROR   | Secsh channel 0 open FAILED: Connection refused: Connect failed
ERROR:paramiko.transport:Secsh channel 0 open FAILED: Connection refused: Connect failed
2020-11-21 02:50:57,169| ERROR   | Could not establish connection from ('127.0.0.1', 52198) to remote side of the tunnel
ERROR:sshtunnel.SSHTunnelForwarder:Could not establish connection from ('127.0.0.1', 52198) to remote side of the tunnel
INFO:root:SSH - Creating tunnel to 06738478
2020-11-21 02:50:57,474| ERROR   | Secsh channel 0 open FAILED: Connection refused: Connect failed
ERROR:paramiko.transport:Secsh channel 0 open FAILED: Connection refused: Connect failed
2020-11-21 02:50:57,478| ERROR   | Could not establish connection from ('127.0.0.1', 52201) to remote side of the tunnel
ERROR:sshtunnel.SSHTunnelForwarder:Could not establish connection from ('127.0.0.1', 52201) to remote side of the tunnel
INFO:root:SSH - Creating tunnel to 06738478
2020-11-21 02:50:57,882| ERROR   | Secsh channel 0 open FAILED: Connection refused: Connect failed
ERROR:paramiko.transport:Secsh channel 0 open FAILED: Connection refused: Connect failed
2020-11-21 02:50:57,884| ERROR   | Could not establish connection from ('127.0.0.1', 52204) to remote side of the tunnel

The section about failing to connect repeats itself. My laptop is on the same 192.168.0.x network as the Apalis module. I don’t understand why the tunnel source is 127.0.0.1

When I try to Deploy and Debug I get errors.
In the Visual Studio Build Output window I see the following:

Starting Torizon build...
Starting SDK container...
1>------ Build started: Project: TorizonApp2, Configuration: Debug_debian_buster-slim_arm64v8 x64 ------
1>Build started 11/21/2020 2:54:16 AM.
1>Target InitializeBuildStatus:
1>  Touching "C:\Users\stran\source\repos\TorizonApp2\obj\x64\Debug_debian_buster-slim_arm64v8\TorizonApp2.tlog\unsuccessfulbuild".
1>Target PreBuildEvent:
1>  Torizon Container Build
1>  Containers are up to date.
1>Target _ValidateSources:
1>  Validating sources
1>Target _CopySources:
1>  Copying sources remotely to '192.168.0.86'
1>  Skipping copying files as they are up to date.
1>Target _ValidateCompatibleRemoteArchitectures:
1>  Validating architecture
1>Target _ValidateValidArchitecture:
1>  Validating architecture
1>  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(190,5): warning : Current project architecture 'x64' is incompatible with the remote system architecture 'ARM64' ('ARM64'). Please switch the project architecture to 'ARM64' in Configuration Manager. If you are cross-compiling you can ignore this warning.
1>Done building target "_ValidateValidArchitecture" in project "TorizonApp2.vcxproj".
1>Target ClCompile:
1>  Starting remote build
1>  Compiling sources:
1>  Invoking 'aarch64-linux-gnu-g++'
1>  aarch64-linux-gnu-g++ -c -x c++ /var/rootdirs/home/torizon/TorizonApp2/main.cpp -g2 -gdwarf-2 -o "/var/rootdirs/home/torizon/TorizonApp2/obj/x64/Debug_debian_buster-slim_arm64v8/main.o" -Wall -Wswitch -W"no-deprecated-declarations" -W"empty-body" -Wconversion -W"return-type" -Wparentheses -W"no-format" -Wuninitialized -W"unreachable-code" -W"unused-function" -W"unused-value" -W"unused-variable" -O0 -fno-strict-aliasing -fno-omit-frame-pointer -fthreadsafe-statics -fexceptions -frtti -std=c++11
1>  main.cpp
1>  Done compiling '/var/rootdirs/home/torizon/TorizonApp2/main.cpp'
1>  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(491,5): error : Could not find the specified C/C++ compiler 'aarch64-linux-gnu-g++'. Please make sure that a default C/C++ compiler is installed on the Linux system '-1853473904;192.168.0.86 (username=, port=22, authentication=Password)'. You can install a compiler using your system's package manager. If overriding the default compilers, please check that the compiler is installed in the specified path.
1>  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(491,5): error : aarch64-linux-gnu-g++ exited with code 127, please see the Output Window - Build output for more details (NOTE: the build output verbosity might need to be changed in Tools Options to see more information in the Output Window).
1>  sh: aarch64-linux-gnu-g++: command not found
1>Done building target "ClCompile" in project "TorizonApp2.vcxproj" -- FAILED.
1>
1>Done building project "TorizonApp2.vcxproj" -- FAILED.
1>
1>Build FAILED.
1>
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(190,5): warning : Current project architecture 'x64' is incompatible with the remote system architecture 'ARM64' ('ARM64'). Please switch the project architecture to 'ARM64' in Configuration Manager. If you are cross-compiling you can ignore this warning.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(491,5): error : Could not find the specified C/C++ compiler 'aarch64-linux-gnu-g++'. Please make sure that a default C/C++ compiler is installed on the Linux system '-1853473904;192.168.0.86 (username=, port=22, authentication=Password)'. You can install a compiler using your system's package manager. If overriding the default compilers, please check that the compiler is installed in the specified path.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Application Type\Linux\1.0\Linux.targets(491,5): error : aarch64-linux-gnu-g++ exited with code 127, please see the Output Window - Build output for more details (NOTE: the build output verbosity might need to be changed in Tools Options to see more information in the Output Window).
1>    1 Warning(s)
1>    2 Error(s)
1>
1>Time Elapsed 00:00:05.06
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Note that I selected the “buster-slim” platform because “bullseye” wasn’t an option like in the guide. Visual Studio seems to be complaining about not finding the correct compiler.

Visual Studio also complains under the toolbar about “A remote machine is missing required tools”
[upload|nwaNUiVR4u9FSylUpn3YAYy/RGQ=]

And there is an error about missing tools.
[upload|4gfY5cPHAyBKPBICbjWL26Xl1vU=]

I am running Windows 10 Pro
Visual Studio Community 2019 16.8.2

I started by following all the instructions up to here, step 15 :Build and Run your First C Application

And when that failed, I tried following: Visual Studio Extension For Torizon

I again got to the “Deploy and debug torizon Application” spot, and ran into build failure.

Docker Desktop is installed and running as well, but I’m not sure how that fits in.

Thanks,
-Chris

I was unable to recreate this error on my setup, I’ll need some time to figure out what went wrong here.

As a side note I notice you said you’re Torizon device is network connected via WiFi, correct? Do you have an antenna attached to the wifi module on the device? Also to check that the signal is strong can you SSH into the device from your Windows machine?

Best Regards,
Jeremias

It is on wifi, I do have an antenna, and I can SSH/ping the device.

Thanks,
-Chris

After some more testing we believe we identified a related issue that may be causing what you’re seeing as well on your setup. It seems possible a new VS version may have broken compatibility with our extension. Please allow us some time to investigate and fix this.

Best Regards,
Jeremias

Developing on Win 10 machine (2004+), Visual Studio v16.9.2
I am getting:
Missing tools on 127.0.0.1:gdb
gdb is installed on WSL/Ubuntu18.04LTS

Is this related ? Do I need a different version of Visual Studio ?

Hi @RJKuenzi,

Could you please open a different post with your question. Also in your new post could you go over in detail all the steps you performed leading up to this issue? This is so we can try and reproduce this on our side.

Best Regards,
Jeremias

Was this ever solved I have the same issue with my Verdin iMX8M Mini on the Dahlia Carrier Board.

Maybe it has to do with the port for the back-end API. I have my at 5000 but have no idea if that is right?

Hi @jeffbelz,

Could you please open a new thread with your question. It will be easier to track your issue if it’s separate, instead of continuing with this old thread.

Please include a step by step of what you did to produce this error as well as a versions of things on your development setup.

Best Regards,
Jeremias