Unable to resolve packages in torizonPackages.json in a C++ cmake project

I am getting the above error where the packages list isnt able to be resolved.

build, debug etc works just fine. only the package suggestions dont seem to work due to this.

The complete error is as follows:

Unable to load schema from 'debian://schemas/packages': cannot open debian://schemas/packages. Detail: Unable to resolve resource debian://schemas/packages.(768)

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hand-shake,

When encountering issues with package suggestions not being resolved in the torizonPackages.json file within a C/CMake project, there are a few steps you can take to troubleshoot and potentially resolve the problem:

  1. Ensure VS Code Extensions are Up-to-Date: Make sure that your Visual Studio Code (VS Code) and the Torizon IDE extension are up to date. Outdated extensions might not function correctly with newer features or package feeds.

  2. Check Internet Connection: Autocompletion for package names requires an active internet connection to fetch package lists from Debian and Toradex feeds. Ensure your development machine is connected to the internet.

  3. Restart VS Code: Sometimes, simply restarting VS Code can resolve issues with extensions not functioning as expected.

  4. Check torizonPackages.json Syntax: Ensure that the torizonPackages.json file is correctly formatted and that there are no syntax errors. JSON is very strict about its syntax, including the use of double quotes and commas.

  5. Manual Package Verification: If autocompletion is not working, you can manually verify package names by searching the Debian and Toradex package repositories online. Once verified, manually add the package names to the torizonPackages.json file.

  6. Clear VS Code Cache: Clearing the cache of VS Code can sometimes resolve issues with extensions. You can do this by closing VS Code, navigating to the VS Code cache directory (location varies by operating system), and deleting its contents.

  7. Check for Extension Conflicts: Other installed extensions might conflict with the Torizon IDE extension. Try disabling other extensions temporarily to see if this resolves the issue.

  8. Reinstall Torizon IDE Extension: If none of the above steps work, try uninstalling and then reinstalling the Torizon IDE extension in VS Code.

Remember, when adding packages manually to the torizonPackages.json file, ensure that they are available in the Debian or Toradex feeds and compatible with your target architecture.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

High performance, low power Embedded Computing Systems | Toradex Developer Center.

Greetings @geopaxpvtltd,

I’ve seen this happen before when there was issues with the Debian website. Our extension loads the schema from the Debian website for the list of packages. If this is inaccessible for any reason then this error message would occur in that case.

Does this happen to you still? Or has the issue cleared up by now?

Best Regards,
Jeremias

Hi @jeremias.tx !

I tried to manually access the package list and it apparently works but I get the following error in runtime status of the extension

image

I can manually ping the packages.debian.org server both from windows and wsl.

As you can see, there is no reason mentioned for the failed request

That’s strange it only fails to access the server from the extension itself. Let me ask internally and see if anyone else has seen something like this before. What version of the extension are you using?

Best Regards,
Jeremias

I asked around internally and it seems this is a known issue actually: C++ CMake Console Application Template has no torizonPackages.json autocomplete feature · Issue #205 · toradex/vscode-torizon-templates · GitHub

For some reason it only seems to happen on the CMake template. Could you comment on the Github issue and let the maintainers know that you are affected as well. It helps the maintainers with prioritization of issues and all that.

Best Regards,
Jeremias

1 Like