Hi toradex,
I wanted to create new torizon project (for example c++ project ) from the Visual Studio Code, but i could not see any templates availabe?
Here what i can see but no templates to select!
Any Help?
Best regards,
Ahmed49
Hi toradex,
I wanted to create new torizon project (for example c++ project ) from the Visual Studio Code, but i could not see any templates availabe?
Here what i can see but no templates to select!
Any Help?
Best regards,
Ahmed49
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello Ahmed,
I’m sorry to hear you’re having trouble with missing templates when creating a new Torizon project in Visual Studio Code. Let’s try a few steps to resolve this:
Ensure the Torizon Extension is Installed: First, check that the Torizon extension for Visual Studio Code is installed and up-to-date. You can do this by going to the Extensions view in Visual Studio Code and searching for “Torizon”. If it’s not installed, you can add it from the Visual Studio Code Marketplace.
Check for Updates: If the extension is already installed, make sure it’s the latest version. Updates often include new templates or fixes for issues related to template availability.
Restart Visual Studio Code: After installing or updating the extension, restart Visual Studio Code to ensure all changes take effect.
Use the Command Palette: Open the Command Palette in Visual Studio Code (Ctrl+Shift+P or Cmd+Shift+P on macOS) and type “Torizon/C-C++: Create C/C++ application”. This should start the process to create a new Torizon project and show you the available templates.
Check Docker Configuration: Make sure Docker is running on your system, as the Torizon extension relies on Docker to set up the development environment. If Docker isn’t running, start it and try creating a new project again.
Verify Internet Connection: The extension might need to download additional resources or templates from the internet. Ensure your internet connection is stable.
I hope these steps help you get the templates you need. If the issue persists, there might be a deeper configuration problem with Visual Studio Code or the Torizon extension.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
Visual Studio Code IDE Extension | Toradex Developer Center.
Hi, @Ahmed49 !
I could reproduce a similar behavior after disconnecting my computer from the internet (as pointed out on bullet 6 from @ToradexAI’s answer).
Could you please try again with internet access? Torizon IDE gets the template list from https://github.com/toradex/vscode-torizon-templates.git/
, as you can see in my logs:
[11-28 08:56:34.319] Activating Torizon IDE ...
[11-28 08:56:34.319] Torizon IDE version :: 2.6.3
[11-28 08:57:34.322] Latest Torizon IDE published :: not possible to reach marketplace
[11-28 08:57:34.322] Resolving host IP address ...
[11-28 08:57:34.333] Host IP address OK
[11-28 08:57:34.342] Docker installed OK
[11-28 08:57:34.375] Docker running OK
[11-28 08:57:34.420] Docker compose OK
[11-28 08:57:34.429] PowerShell OK
[11-28 08:57:34.439] git OK
[11-28 08:57:34.448] dig OK
[11-28 08:57:34.457] avahi-resolve OK
[11-28 08:57:34.466] nmap OK
[11-28 08:57:34.474] iputils-ping OK
[11-28 08:57:34.484] file OK
[11-28 08:57:34.496] sshpass OK
[11-28 08:57:34.507] net-tools OK
[11-28 08:57:34.517] rsync OK
[11-28 08:57:34.517] Cloning project templates
[11-28 08:57:34.527] Project templates clone OK
[11-28 08:57:34.594] Cloning project templates
[11-28 08:57:34.612] ERROR :: Error trying to clone application templates
[11-28 08:57:34.612] Cloning into '/home/grilo/.apollox'...
fatal: unable to access 'https://github.com/toradex/vscode-torizon-templates.git/': Could not resolve host: github.com
[11-28 08:57:34.623] ERROR :: Error trying to checkout application templates
[11-28 08:57:34.623] fatal: cannot change to '/home/grilo/.apollox': No such file or directory
[11-28 08:57:34.624] Checking connected devices ...
[11-28 08:57:34.625] Scanning Torizon devices ...
[11-28 08:57:34.636] Debian bookworm packages list load OK
[11-28 08:57:34.637] Torizon IDE extension activated
Best regards,
Hello @henrique.tx !
As recommended in the documents and video I have done everything the same and connected to a target device. However, the “New Torizon projects” template is not loaded and it is blank I have tried restarting vs code and tested the Internet connection multiple times. one thing is noticeable in the terminal output “No workspace opened” Is there any docker-related issue? Please suggest.
Regards,
Anurag
Hi @AnuragBluAI !
From your logs, we can see that your Torizon IDE installation is pulling from branch/tag next
instead of stable
:
Have you installed the pre-release version?
You can check it on your VS Code, via extensions tab. Searching by Torizon IDE there will show something like this:
You can see that in my case I do not have installed the pre-release version. If you are on the pre-release it is recommended that you switch to the stable version.
If this is not the case, then please check your VS Code’s settings.json
and look for torizon.templatesTag
and torizon.templatesBranch
. If they are there, please remove them, close your VS Code and delete the folder ${HOME}/.apollox
. After that just reopen your VS Code and the Torizon IDE Extension should use the stable templates repository.
Please let us know if this solves for you
Best regards,
Hello @henrique.tx ,
Thank you for the information. I got lucky and worked perfectly with this change in my case.
Thankyou!
Anurag
Hi @AnuragBluAI !
Thank you for the feedback! Great to know that this is solved!
And please don’t forget to mark the solution message for this thread!
Best regards,
Hello @henrique.tx
I currently have the same problem.
I removed the torizon.templatesTag
and torizon.templatesBranch
from settings.json.
In my home I don’t have .apollox
.
My Output is the following:
I also use the stable version.
Can you please help me?
Best regards
NicoF
Hi @NicoF !
From your logs, we can see that your VS Code is having a hard time accessing github.com:
Could you please check your internet connection and try again?
Another strange thing: the extension is trying to clone into your /root
directory. This is unexpected since there is no need to execute VS Code as root (nor super user).
Best regards,
Hi @henrique.tx
The internet connetion works.
As far as I know, I haven’t executed VS Code as root. Is there a way to change this directory?
Best regards
NicoF
Hi @NicoF !
So it is your VS Code that can’t access internet/github?
I would guess that you either started VS Code as sudo
or as the root
user. You can check e.g. by running ps aux | grep code
to see which user launched VS Code. If that is the case, please execute VS Code as a normal user.
Best regards,
Hi @henrique.tx
I’m using VS Code in Windows 10. So I’m starting it as a normal Windows user not as administrator.
How do I run it as normal user?
For the installation of the Torizon IDE Extension I followed exactly the steps in the video on:
https://developer.toradex.com/torizon/application-development/ide-extension/set-up-the-ide-ext2-environment/
I created a new user name but if I check it with ps aux | grep code
it looks like that VS Code is launched as root
user
Best regards,
NicoF
Hi @NicoF !
The issue you are facing could be related to the fact that you are using root
in your installation of the Torizon IDE.
I would like to ask you to reinstall it carefully following the steps from this video: https://youtu.be/YykIftUiMGU?t=453. Here I highlighted the timestamp from when the user is created: you can see that it should not be root
. Please be sure to follow the entire video and let us know how it goes on your side.
Best regards,
Hey @henrique.tx
I have found the problem. It was because the WSL had no internet access. Now the templates have been loaded. However, the whole thing is only executed as root and the .apollox is also created under root.
Best regards,
NicoF
Hi @NicoF !
Happy to know that you found out!
I would like to ask you to perform the reinstall to not use the root
user. As you can see in the installation instruction video, the root
user is not used.
Best regards,
Hi @henrique.tx
How do I not use the root user? Because I did exactly the same as in the video and it always continue as root.
Best regards,
NicoF
Hi @NicoF !
Since your issue is a bit different from the original one in this thread and the original issue is solved, could you please create a new thread? We will continue from there. Please don’t forget to mention this thread on the new one you will create.
Thanks!