ApolloX "Try Update Template" fails for TCB template

Using ApolloX with TCB project (created from template), the item
immagine
is available, but it fails with the error

Copy-Item: /home/username/projectname/.conf/projectUpdater.ps1:59:1
Line |
  59 |  Copy-Item `
     |  ~~~~~~~~~~~
     | Cannot find path '/home/username/.apollox/tcb/.conf/update.json' because it does not exist.

and it’s expected since the file ‘/home/username/.apollox/tcb/.conf/update.json’ doesn’t exist.

Hi @vix ,

Thanks for the report, I was able to reproduce your issue and I’ll pass it to the IDE extension team. I’ll update here if any development happens.

Feel free to ask other related questions, if you have any.

Best regards,
Lucas Akira

Hey @vix ,

we should have it fixed for the next stable release. The May 2023 VS Code release was released today, and we are planning to follow these monthly release pattern also for our extension. So, we will test it based on the VS Code May 2023 before our release, should be ready next week.

Best Regards,

1 Like

Hi @matheus.tx
I’ve just tried the pre-release version 2.0.7 and I can give a feedback.
The original issue

 Cannot find path '/home/username/.apollox/tcb/.conf/update.json' because it does not exist.

is fixed.
But now this error comes out

✅ always accept new
Copy-Item: /home/username/projectname/.conf/projectUpdater.ps1:167:1
Line |
 167 |  Copy-Item $Env:HOME/.apollox/$templateName/Dockerfile .
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path '/home/username/.apollox/tcb/Dockerfile' because it does not exist.

Can you reproduce this too?

Hello @matheus.tx
I see that the latest release of ApolloX is 2.0.7, released on 16/6/2023.
On the issue tracker release 2.1.0 is referenced. I think that this is the next stable release you mentioned in your post.
Do you know when it will be released?

Hey @vix

yeah, we had some internal setbacks for the last two weeks (internal training program), but we are on track to release the new version at the end of the next week. I will let you know.

BR,

Hi @matheus.tx
I saw on the marketplace that release 2.0.10 has been released.
I manually updated it in my WSL VS Code.
As I wrote in the past, for some unknown reasons, my VS Code in WSL is not able to see updates of Toradex extensions.

Hey @vix

sorry for the delay, we are late with the stable release. This next pre-release should resolve this ticket, and it will already be added to the next stable. I will comment here and will close it as soon we release.

About:

We are following this closely, but we have had no further reports other than yours regarding this specific issue. But thanks to report anyway, we still following and asking our FAEs if someaone else is reporting it.

I am also unable to see update of the extension. my current version says 2.0.0

also, I am unable to update to the latest template.

Hi,

I recently updated the extension to 2.1.0. but this problem persists with the output:

Get-Content: /home/ha-01/GeopaxApp/.conf/projectUpdater.ps1:43:17
Line |
  43 |  $templateName = Get-Content $projectFolder/.conf/.template
     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path '/home/ha-01/GeopaxApp/.conf/.template' because it does not exist.

 *  The terminal process "pwsh '/home/ha-01/GeopaxApp/.conf/projectUpdater.ps1', '/home/ha-01/GeopaxApp', 'GeopaxApp'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Hey @geopaxpvtltd

could you please create another project from scratch and copy the changes for this new project? Probably the new project .conf/.template file will be created with success.

Let me know.

BR,

Hi @matheus.tx,

I created a new project but it still gives the same output:

Get-Content: /home/ha-01/testproj1/.conf/projectUpdater.ps1:43:17
Line |
  43 |  $templateName = Get-Content $projectFolder/.conf/.template
     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path '/home/ha-01/testproj1/.conf/.template' because it does not exist.

 *  The terminal process "pwsh '/home/ha-01/testproj1/.conf/projectUpdater.ps1', '/home/ha-01/testproj1', 'testproj1'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Hey @geopaxpvtltd

I wasn’t able to reproduce on my side :pensive:.
Could you please do another test?
Please remove the templates repo folder:

rm -rf $HOME/.apollox

So, reload the VS Code Window (if it was already opened) and try to create the project again. Check if there is a .conf/.template file before you run the update task int he workspace created.

BR,

Hey @geopaxpvtltd

we made some changes on the TCB template and updater script. Could you please add the following to the your global settings.json? Press F1 or CTRL+SHIFT+P to open the command pallet and choose:

image

Then add these:

    "apollox.templatesBranch": "dev",
    "apollox.templatesTag": "next",

After saving the modifications, close and reopen VS Code.
Now the extension will get the template repository of the latest changes made in dev. Please try the update with these changes and let me know if they work for you.

BR,

Nope there isnt.

[08-08 11:37:54.042] Checkout templates repo to dev OK
[08-08 11:37:54.968] Project templates updated
[08-08 11:37:54.969] Checking connected devices ...

After addition of the settings to the vscode settings.json, I restarted vscode. when I create a new project, the extension give me the above output. but still when I run the update task, it fails with the same error:

Get-Content: /home/ha-01/testproj2/.conf/projectUpdater.ps1:43:17
Line |
  43 |  $templateName = Get-Content $projectFolder/.conf/.template
     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path '/home/ha-01/testproj2/.conf/.template' because it does not exist.

 *  The terminal process "pwsh '/home/ha-01/testproj2/.conf/projectUpdater.ps1', '/home/ha-01/testproj2', 'testproj2'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Hey @geopaxpvtltd

thanks a lot for the tests. This behavior is weird. Can I ask you to make more one test? Please create the file manually, the .conf/.template. The .template must have the following content:

tcb

So, after that try to run the update.

Sorry for ask for so many test, but this is important to us to understand the behavior and fix it.
Thanks a lot!

BR,

It works. but stops at the following error (I just kept closing all the changes tabs. perhaps it is due to that?):

⚠️  project updater updated, running it again
✅ always accept new
Renaming file contents ...
/home/ha-01/GeopaxApp/.conf/tmp/.gitignore
/home/ha-01/GeopaxApp/.conf/tmp/.gitlab-ci.yml
/home/ha-01/GeopaxApp/.conf/tmp/build-torizoncore.yaml
/home/ha-01/GeopaxApp/.conf/tmp/tasks-next.json
/home/ha-01/GeopaxApp/.conf/tmp/tasks-next.json
✅ tasks.json
✅ common
Get-FileHash: /home/ha-01/GeopaxApp/.conf/projectUpdater.ps1:21:14
Line |
  21 |      $file2 = Get-FileHash $_file2
     |               ~~~~~~~~~~~~~~~~~~~~
     | Cannot find path '/home/ha-01/GeopaxApp/.github/workflows/build-torizoncore.yaml' because it does not exist.

 *  The terminal process "pwsh '/home/ha-01/GeopaxApp/.conf/projectUpdater.ps1', '/home/ha-01/GeopaxApp', 'GeopaxApp'" terminated with exit code: 1. 

Not an issue, happy to help.

Best Regards.

Thanks @geopaxpvtltd !

yeah, so maybe the issue now is that the project is too old. But this is already a better result. I’m going to make some more modifications here to address these other issues. I will let you know.

BR,

1 Like

Hey @geopaxpvtltd

the new changes from dev, that I mention here: OTA issues from Torizon Platform and Github Actions - #28 by matheus.castello also apply to this ticket. Try to update now, this should be fixed. Let me know if this works for you.

BR,