Bug in VS Code "Torizon IDE Extension" V3.2.0?

Updated the plugin today and if I try to create a new project (now with workspaces as I see) I get an error:

And a file, called “.apollox.cmd.log” is opened with the following content:

Data:e[0m
	Template Folder: /home/username/.apollox/cppConsolee[0m
	Project Name: teste[0m
	Container Name: testcppe[0m
	New Project Path: testcpp/teste[0m
	Template: /home/usernamee[0m
	Is VS Code: Falsee[0m
	Send Telemetry: Truee[0m
	Has Custom Fields: Falsee[0m
e[31m
Error: Template '/home/username' not found in templates.jsone[0m
e[31mError cause: Not found
e[0m

No project is created.

Happens also on another Computer, there I see a messagebox telling me no workspace is open. If I then select a workspace, no project is created.

In the Marketplace, I see versions 3.2.100, 3.2.101, and 3.2.102. I have 3.2.0 installed, and even when I select “Install specific version,” these versions are not offered to me.

Going back to version 3.1.1 I can create a new project.

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Based on the error message in your .apollox.cmd.log file and the template path issue you’re experiencing, this appears to be related to the recent migration of the Torizon IDE Extension to a new architecture with workspaces and updated dependencies.

Solution Steps

1. Install the Pre-release Version

The issue you’re encountering is likely resolved in the pre-release version of the Torizon IDE Extension(1). The pre-release version includes updated templates and dependencies that address these workspace-related errors(1).

2. Configure VS Code for Development Branch

Update your VS Code global settings to use the development branch templates(1):

  1. Open Command Palette > Preferences: Open Settings (JSON)
  2. Add the following configuration(1):
"torizon.templatesRepo": "https://github.com/torizon/vscode-torizon-templates",
"torizon.templatesBranch": "dev",
"torizon.templatesTag": "dev"

(1)

3. Ensure Internet Connection

The extension downloads templates from the internet(2). Make sure you have a stable internet connection, as the Torizon IDE gets the template list from https://github.com/toradex/vscode-torizon-templates.git/(2).

4. Restart VS Code

Close and reopen Visual Studio Code completely to ensure all changes take effect(1).

Troubleshooting the Template Path Issue

The error Template '/home/username' not found in templates.json suggests the template path is being truncated or incorrectly parsed. This is a known issue that has been addressed in the newer versions of the extension.

Version Availability

The version discrepancy you’re seeing (having 3.2.0 while marketplace shows 3.2.100+) indicates you may need to:

  1. Uninstall the current extension completely
  2. Restart VS Code
  3. Install the pre-release version directly from the marketplace

These steps should resolve both the template creation error and the workspace-related issues you’re experiencing across multiple computers.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Hey @Qubit

sorry to hear that you are having issues. Could you please remove the templates folder?

rm -rf ~/.apollox

On VS Code side, please restart the VS Code, this will force the extension to clone again the templates repository. There was an issue fixed with the tag of the latest release, this should solve your problem.

If this does not solve it for you, check your “User Settings (JSON)” for the following properties:

"torizon.templatesBranch": "bookworm-7",
"torizon.templatesTag": "v3.2.0"

If these are with different values, please set it to the values I put on the snippet above. These are the values that work with the latest release.

Let me know.

BR,

Hi Matheus

Tried both with no success. The error message is strange, it looks like it searches for a template with the name ‘/home/username’ in templates.json :thinking: I would expect ‘dotnetConsole’ or so :slight_smile:

Error: Template ‘/home/’ not found in templates.json

yeah, this is weird. Could you report here the result of the following command:

cd ~/.apollox && git rev-parse HEAD

It seems that it is still getting an old version of the repo.

gives me: fe4f3c03dbaaa1b1ed7655f4a736c480c40e13d5

Btw: with a right click on the extension and click on “Install Specific Version” I can select 3.2.100, 3.2.100, 3.2.102 and 3.2.103 - but only if I’m not connected to the Torizon WSL. Connected to WSL it only shows me 3.2.0 as latest version.

Yes, the hash should be c44b5edcacc23d9681242bb42e9c8a5cb5cbd6e8.

The version on the WSL side is correct, on Windows, as the Windows Wizard is an experimental feature, it publishes as “pre-release” which generates these 3.x.1xx versions.

What should be setting this wrong templates repo hash is the:

"torizon.templatesBranch": "bookworm-7",
"torizon.templatesTag": "v3.2.0"

It can be set on the “User Settings (JSON)” from WSL or the Windows side. Could you check on both sides?

Also, please provide the activation logs from the extension; it will help us determine which values are being used to clone the repository.

BR,

Now it works!

Both settings were set to “next” in the WSL settings. :man_shrugging:

Thank you very much for your help! :bouquet: