IDE backend process only works on initial install

I am following the quickstart guide to setup my development environment as follows:
-Ubuntu 22.04.1 LTS
-Visual Studio Code 1.72.2
-Colibri iMX7D

When I first install any version (Early Access or regular) of Toradex Torizon Support, the IDE loads up and can see my device. When I close and reopen Visual Studio, I get an error saying “Cannot connect to Torizon IDE backend process”. I can then reinstall (or install a different version) and it again works only for that one instance.

Greetings @shahrukh,

This sounds like some strange issue. I noticed you are using Ubuntu 22.04 did you install libssl1.1, as noted here: Visual Studio Code Extension for Torizon | Toradex Developer Center

Best Regards,
Jeremias

Yes, I have the latest package, libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb, installed.

Yes, I have the latest package, libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb, installed.

Ok good just wanted to confirm this.

So when the extension loads properly are you able to do things with it? Or do you notice any other issues?

Do you have any other VSCode extensions installed?

Finally is there anything on your system that is using port 5000. This is the port our extension uses to talk with the backend process. If there’s a conflict here I imagine an error like this could occur.

Best Regards,
Jeremias

Strangely, it was working properly for a few hours this morning. This afternoon I am back to the same issue. I have found a work around of simply disabling/reloading/enabling the extension rather than uninstalling/re-installing.

When it is running, I haven’t noticed any other issues. I am able to deploy and debug code onto the remote device. The only other extension installed are Jupyter and Python.

This is what I see when it fails:
[09-26 16:55:04.021] Initializing Torizon Extension
[09-26 16:55:04.045] Checking system setup…
[09-26 16:55:04.047] Checking Moses …
[09-26 16:55:04.047] Starting backend local instance running on port 5000
[09-26 16:55:34.049] Cannot connect to Torizon IDE backend process.
[09-26 16:55:34.050] Torizon Extension Initialized

I also sometimes get
"The terminal process “/usr/bin/bash” terminated with exit code:255

I should add my ubuntu installation is running through a virtualbox on my windows PC. I assume that port 5000 is free as it does work the initial time after a reload.

Thanks for your help,
Shahrukh

Strangely, it was working properly for a few hours this morning. This afternoon I am back to the same issue.

That’s very odd. It was just fine for a few hours? Did you do anything different in that time-frame that might have affected the behavior of the extension or VSCode?

I also sometimes get
"The terminal process “/usr/bin/bash” terminated with exit code:255

I found this thread about that error message: vscode debugger - The terminal process command '/usr/bin/bash' failed to launch (exit code: 1) - Stack Overflow

This may or may not apply to you.

I should add my ubuntu installation is running through a virtualbox on my windows PC.

A proper virtualbox VM shouldn’t have any adverse affects here. But this gives me an idea. You can also run VSCode and our extension on Windows. Just as a sanity check if you install and run VSCode & the extension on Windows does the same issue happen?

This might narrow down whether the issue is with the VM configuration or not.

Best Regards,
Jeremias