VS2019 Torizon Debug

I created my first Torizon c++ project following all the steps of your VS2019 Tutorial. When I run application I obtain from VS2019

SDK container hasn’t been built yet, this may prevent intellisense and auto-completion from working. It will work after a rebuild of the application.
Error starting SDK container.
Error running SDK container.
Code: 500
Description: Internal server error
Message: Can not read file in context: C:\Temporanea\TorizonApp2\appconfig_0\id_rsa
Error starting SDK container.

It seems appconfig_0\id_rsa is not accessible My user is a domain user MYDOMAIN\Fabrizio but is administrator on local machine, id_rsa I dont know why is created with the local administrator PCFAB\Fabrizio, I run VS2019 as domain user.

If it can helps Moses give me this

Serving on http://kubernetes.docker.internal:8090
INFO:root:REST → /api/eulas
INFO:root:REST ← /api/eulas - 200
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/devices
INFO:root:REST ← /api/devices - 200
INFO:root:REST → /api/devices/06846833
INFO:root:REST ← /api/devices/06846833 - 200
INFO:root:REST → /api/devices/06846833/images
INFO:root:SSH - Creating tunnel to 06846833
INFO:root:SSH - Tunnel to 06846833 activated
INFO:root:REST ← /api/devices/06846833/images - 200
INFO:root:REST → /api/devices/06846833/containers
INFO:root:REST ← /api/devices/06846833/containers - 200
INFO:root:REST → /api/devices/06846833/processes
INFO:root:SSH - Connecting to device 06846833
INFO:root:SSH - Connected to device 06846833
INFO:root:REST ← /api/devices/06846833/processes - 200
INFO:root:REST → /api/devices/06846833/storage
INFO:root:REST ← /api/devices/06846833/storage - 200
INFO:root:REST → /api/devices/06846833/memory
INFO:root:REST ← /api/devices/06846833/memory - 200
INFO:root:REST → /api/devices/06846833
INFO:root:REST ← /api/devices/06846833 - 200
INFO:root:REST → /api/devices/06846833/images
INFO:root:REST ← /api/devices/06846833/images - 200
INFO:root:REST → /api/devices/06846833/containers
INFO:root:REST ← /api/devices/06846833/containers - 200
INFO:root:REST → /api/devices/06846833/processes
INFO:root:REST ← /api/devices/06846833/processes - 200
INFO:root:REST → /api/devices/06846833/storage
INFO:root:REST ← /api/devices/06846833/storage - 200
INFO:root:REST → /api/devices/06846833/memory
INFO:root:REST ← /api/devices/06846833/memory - 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/534d7079-1b74-48d7-96c7-ba9a0424e2f3/sdk/run
ERROR:root:Error: 520 Container image not found on local host. Image torizonapp2_arm32v7-debian_bullseye_debug_534d7079-1b74-48d7-96c7-ba9a0424e2f3_sdk_image is not available.
INFO:root:REST ← /api/applications/534d7079-1b74-48d7-96c7-ba9a0424e2f3/sdk/run - 520
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/534d7079-1b74-48d7-96c7-ba9a0424e2f3/sdk/run
INFO:root:SDK - SDK image not found, building it.
ERROR:root:Can not read file in context: C:\Temporanea\TorizonApp2\appconfig_0\id_rsa
Traceback (most recent call last):

  • File “docker\api\client.py”, line 259, in _raise_for_status*
  • File “requests\models.py”, line 943, in raise_for_status*
    requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localnpipe/v1.41/images/torizonapp2_arm32v7-debian_bullseye_debug_534d7079-1b74-48d7-96c7-ba9a0424e2f3_sdk_image/json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  • File “applicationconfig.py”, line 1612, in start_sdk_container*
  • File “docker\models\images.py”, line 316, in get*
  • File “docker\utils\decorators.py”, line 19, in wrapped*
  • File “docker\api\image.py”, line 245, in inspect_image*
  • File “docker\api\client.py”, line 265, in _result*
  • File “docker\api\client.py”, line 261, in _raise_for_status*
  • File “docker\errors.py”, line 31, in create_api_error_from_http_exception*
    docker.errors.ImageNotFound: 404 Client Error: Not Found (“no such image: torizonapp2_arm32v7-debian_bullseye_debug_534d7079-1b74-48d7-96c7-ba9a0424e2f3_sdk_image: No such image: torizonapp2_arm32v7-debian_bullseye_debug_534d7079-1b74-48d7-96c7-ba9a0424e2f3_sdk_image:latest”)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  • File “docker\utils\build.py”, line 96, in create_archive*
    PermissionError: [Errno 13] Permission denied: ‘C:\Temporanea\TorizonApp2\appconfig_0\id_rsa’

During handling of the above exception, another exception occurred:

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 144, in wrapper*
  • File “connexion\decorators\validation.py”, line 384, in wrapper*
  • File “connexion\decorators\parameter.py”, line 121, in wrapper*
  • File “api.py”, line 1097, in applications_application_sdk_run_get*
  • File “api.py”, line 1088, in applications_application_sdk_run_get*
  • File “applicationconfig.py”, line 1616, in start_sdk_container*
  • File “applicationconfig.py”, line 1339, in _build_sdk_image*
  • File “dockerapi.py”, line 39, in build_image*
  • File “docker\api\build.py”, line 159, in build*
  • File “docker\utils\build.py”, line 29, in tar*
  • File “docker\utils\build.py”, line 99, in create_archive*
    OSError: Can not read file in context: C:\Temporanea\TorizonApp2\appconfig_0\id_rsa
    INFO:root:REST ← /api/applications/534d7079-1b74-48d7-96c7-ba9a0424e2f3/sdk/run - 500

And when I launch SSH from VS2019

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for ‘C:\Users\Fabrizio.CTIDOMAIN\.moses\devices\06846833\id_rsa’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key “C:\Users\Fabrizio.CTIDOMAIN\.moses\devices\06846833\id_rsa”: bad permissions
torizon@colibri-imx8x-06846833’s password:

I think I resolved launching command Windows Console

takeown /F C:<mypath>\appconfig_0 /R

so all files became of current user

please change in the tutorial port 8090 with 5000 or write
to change debug precompiled option to

“$(TorizonExtPath)\TorizonBuildContainer.exe” “$(torizon_configpath)” “$(torizon_configtype)” -sdk -port 8090

Greetings @fabrizio.camagna,

Glad to hear you were able to resolve your issue.

However I have some comments/questions regarding your solution.

The “Permissions are too open” error seems to be a somewhat common error in Windows usually caused by configuration settings. Please see the thread here for more information: Windows SSH: Permissions for 'private-key' are too open - Super User

As for the port number. When you installed the extension did it use port 8090 by default? That’s strange it should use port 5000 by default. I’ll inquire about this internally.

Best Regards,
Jeremias