Debugging with visual studio code does not work anymore. I use the torizon extention and created a python “hello world” application with it. When I start the the debugging I can create and load the container but receive the following error messages:
Set up:
Hardware: Verdin IMX8MM 2GB WB IT
VScode: version 1.52.1
OS: Windows 10
Toradex extension: 1.3.0
Error Messages:
“request”:“attach” requires either “connect”, “listen”, or “processId”
at the bottom this also appears
Error (530) - Docker exception: The command ‘/bin/sh -c apt-get update && apt-get install -y --no-install-recommends python3-minimal python3-pip python3-setuptools && rm -rf /var/lib/apt/lists/’ returned a non-zero code: 100 code:100 message:The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends python3-minimal python3-pip python3-setuptools && rm -rf /var/lib/apt/lists/’ returned a non-zero code: 100 Step 1/15 : FROM --platform=linux/arm64 torizon/debian:2-bullseye —> 09f59e511484 Step 2/15 : EXPOSE 6502 —> Using cache —> 1d401aabc6ad Step 3/15 : ARG SSHUSERNAME=torizon —> Using cache —> aa26a027ddb8 Step 4/15 : ENV DEBIAN_FRONTEND=“noninteractive” —> Using cache —> ebf57ab0fedf Step 5/15 : RUN apt-get update && apt-get install -y --no-install-recommends python3-minimal python3-pip python3-setuptools && rm -rf /var/lib/apt/lists/…
Do you have any Idea where the problem could be?
Greetings @relu_matriq,
Looking at the error message it seems the container failed to build. In particular it tries to run:
RUN apt-get update && apt-get install -y --no-install-recommends python3-minimal python3-pip python3-setuptools && rm -rf /var/lib/apt/lists/
However this gives a non-zero exit code which causes the process to fail, at least as stated by the error message. I don’t see anything wrong with the above command that could cause this error.
Did you configure this project in anyway? You said this is a “hello world” app, so it just the default template then when you create a project?
Also can you reproduce this issue reliably? For example if you start a new python project from scratch does it happen again?
Debugging with visual studio code does not work anymore.
Are you implying that this did work for you before and no longer does?
Unfortunately I’m not able to reproduce this issue on my side. Also based off the error messages you provided it’s not completely clear to me what caused this issue to begin with.
Best Regards,
Jeremias
Thanks for the reply
Yes the exact same project was working a couple of weeks ago. But I had it before that projects suddenly stopped working (I think with the same error). That’s why I tried the default python application which until now always worked. (“Create Python application” in vscode)
I found now that it works if I build a 32Bit container, but I think 64Bit should also be possible on the i.mx8mm?
My next idea would be to update also the torizon OS on the COM to the newest version.
Huh this is a really odd issue. And I’m still not able to reproduce this with the default python application one either 32 or 64 bit configurations. By the way the i.MX8MM SoC is arm64 based architecture.
I have an idea here if you could give it a try. Based on the information you provided earlier it looks like you’re using the stable release of our extension. However if you check the extension marketplace there should be another extension for Torizon marked “early access”. This version has fixes and features that have not made their way to the stable release yet. This shouldn’t affect anything for your issue, but could you try and reproduce this issue on the early access version of the extension? (You’ll need to uninstall the stable version before installing the early access).
Best Regards,
Jeremias
I used to meet a similar issue when downloading debian package for the SDK container or debug/release container on the device. It seems a certain package from debian site is broken or it just can’t be fetched successfully. In the end, I change the feeds for SDK container or debug/release container. To do that, you can change preinstallcommands
and sdkpreinstallcommands
in Torizon Extension to RUN sed -i 's%http://deb.debian.org%http://debian.ethz.ch%g' /etc/apt/sources.list && sed -i 's%http://security.debian.org%http://debian.ethz.ch%g' /etc/apt/sources.list
.
Here http://debian.ethz.ch
is an example. You can choose one from here.
I tried the early access, unfortunately also didn’t helped. I received the same error.
Considering the bit width, I tried now again a 32 and 64 bit application, both where not working. So there seems also to be some sort of randomness…
Thanks for the Idea, I tried it. But resulted in the same error:
Local docker exception. :: Error (530) - Docker exception: The command ‘/bin/sh -c dos2unix /requirements.txt && dos2unix /setup.sh && dos2unix /cleanup.sh && chmod a+x /setup.sh && chmod a+x /cleanup.sh && /setup.sh debug && pip install -r /requirements.txt && /cleanup.sh debug’ returned a non-zero code: 1 code:1 message:The command ‘/bin/sh -c dos2unix /requirements.txt && dos2unix /setup.sh && dos2unix /cleanup.sh && chmod a+x /setup.sh && chmod a+x /cleanup.sh && /setup.sh debug && pip install -r /requirements.txt && /cleanup.sh debug’ returned a non-zero code: 1 Step 1/17 : FROM --platform=linux/arm torizon/debian:2-bullseye —> b489bed53ad4 Step 2/17 : EXPOSE 6502 —> Using cache —> 07b2edaee3f5 Step 3/17 : ARG SSHUSERNAME=torizon —> Using cache —> 831a34bc04d4 Step 4/17 : ENV DEBIAN_FRONTEND=“noninteractive” —> Using cache —> 794523a9b359 Step 5/17 : RUN sed -i 's%http://deb.debian.org%…
I think I found the problem:
I checked the wsl version with the command below and noticed that Ubuntu-18.04 has Version 1 instead of 2
wsl -l -v
I updated it with:
wsl --set-version Ubuntu-20.04 2
After that the program worked
@relu_matriq,
Ahh interesting, very subtle problem. Though I’m glad you were able to nail down the issue. Strange how the project worked for you previously though. Probably some weirdness with WSL/Windows.
In any case, please let us know if you experience issues in the future.
Best Regards,
Jeremias