Start Dgebugging Error: 525 error gathering device information

After a long time I am back to the project of porting our software from WinCE to Torizon. Unfortunately I cannot start debugging the C++ software, I always get the following error message:

Remote docker exception. :: Error (525) - Docker exception: 500 Server Error for http://127.0.0.1:40159/v1.40/containers/7f192e30356c5719e1703b07007a1433cb15bb8be09521ca0ea14813149d9816/start: Internal Server Error (“error gathering device information while adding custom device “apalis-imx8-0649xxxx”: no such file or directory”) device:0649xxxx

shortened output looks like:


[08-30 13:15:27.540] Device 0649xxxx selected.

[08-30 13:15:27.540] Updating app configuration…

[08-30 13:15:27.555] Deploying image to device (may take a few minutes)…

[08-30 13:15:38.875] Deploying application to device…

[08-30 13:15:38.878] Image on target is already up to date.

[08-30 13:15:39.487] Restarting application container…

[08-30 13:15:40.413] sending incremental file list

[08-30 13:15:40.413] my-super-uber-application

[08-30 13:15:40.414] sent 143 bytes received 12,197 bytes 8,226.67 bytes/sec

[08-30 13:15:40.414] total size is 4,086,160 speedup is 331.13

[08-30 13:15:40.913] Remote docker exception.

When I create a C/C++ example in VSC I can debug it on the hardware without any problems.

I don’t know where to start because I can’t do much with the error message. Maybe it is a problem with the rights (the programme would need root rights) or because a kernel module is missing (atemsys from the EtherCAT master of acontis).

Any hints?

OS: 5.4.129-rt61-5.4.0-devel+git.022cb949c6ec #1-TorizonCore SMP PREEMPT_RT Fri Sep 3 10:02:59 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
Visual Studio Code: latest version
Extension: tried with both, stable V1.3.0 and Early Access V1.4.252

Greetings @Qubit,

Judging by the error and other logs it appears the error was with starting the container on the target device. The specific error “no such file or directory” can occur when starting a container and trying to pass files/directories into the container at run time.

Are you bind mounting anything into your container?

What does the configuration for your project look like?

Best Regards,
Jeremias

I don’t bind anything.

Which configuration file do you want to see?

In your project folder there should be a config.yaml file that describes how your project is configured for our extension. Since you’re able to build and debug a fresh C/C++ example I assume the issue is something with your project’s specific configuration.

Just to be clear if you create a brand new C/C++ project with the Torizon extension, then try to build/debug the template hello-world project, does this work?

Best Regards,
Jeremias

Ok, compared the config.yaml files from a newly created project (which does debug) and found only a few differences. One is the device:

My project:

device:
    common:
    - apalis-imx8-0649xxxx

New created project:

devices:
    common: []

Removed the device and now it works. :man_shrugging: Thanks jeremias for the starting point where to search.

Huh that’s strange. So the device entry was the issue?

You said it works now, so does that mean you can now debug and deploy to the device? Did you re-add the device at all?

Best Regards,
Jeremias

Yes, I can debug now. An I can reproduce it when I add the device again in VSC by clicking the plus button, then I get the same error again. Remove with minus button and I can debug again. The name+serial is the same I use for the SSH connection in KiTTY (copy & paste).

But my device appears under “DEVICES”:

Maybe I don’t understand something :slight_smile:

I feel like something is still wrong here. How are you debugging the code without a device added? Where is the application code being ran for the debug process if there’s no device added?

Also are you adding the device before or after the project is created?

I recall we had a problem in the past where if the device is added after project creation weird issues could occur.

Best Regards,
Jeremias

The project is already created and I add/delete afterwards the device. Also my (second) test project also have no device in config.yaml.

Does it work because I only have 1 device unter “DEVICES” (see screenshot)?

If I erase als images/containers on my device with portainer it’s deployed again.

I guess there’s not much issue as long as your project is working, despite there being some strange behavior I don’t fully understand here.

In general however when you add a device it should be made available to all Torizon-based projects. My only suggestion would be to try adding the device prior to any project creation next time. Again though, as long as your project works then I suppose we could just leave it at that.

Best Regards,
Jeremias