portainer: App Templates regression since 2.22.0
Before you start please confirm the following.
- Yes, I’ve searched similar issues on GitHub.
- Yes, I’ve checked whether this issue is covered in the Portainer documentation or knowledge base.
Problem Description
Custom App Templates JSON using version 2 format does not work correctly since Portainer 2.22.
List of templates is loaded correctly in UI but I’m unable to open them. It starts to display the template settings but 1 second after the UI goes back to the list. The issue seems related to the new “id” parameters that appeared with App Templates v3.
Another issue is that App Templates V3 is not currently documented anywhere (or I could not find its documentation).
Expected Behavior
App templates v2 and v3 should work correctly in all recent versions of Portainer.
Actual Behavior
List is loading correctly but not the Template details and options page.
Steps to Reproduce
I did some extended testings and it shows some clear regressions since 2.22.0 :
| Portainer version | V2 | V2 with ID | V3 | V3 without ID |
|---|---|---|---|---|
| 2.23 | KO | KO | Works | KO |
| 2.22.0 | KO | KO | Works | KO |
| 2.21.3 | Works | Works | Works | Works |
| 2.20.3 | Works | Works | Works | Works |
App Templates files used :
- v2 : https://slymsoft.com/testv2.json
- v2 (with ID) : https://slymsoft.com/testv2-withid.json
- v3 : https://slymsoft.com/testv3.json
- v3 (without ID) : https://slymsoft.com/testv3-withoutid.json
You just have to point to these URL to reproduce the behaviour (not loading details page on any Template).
Portainer logs or screenshots
Most of the time there is no error, it just goes back to the list after selecting a template.
Sometimes there is an error in the events :
Portainer version
2.23.0
Portainer Edition
Business Edition (BE/EE) with 5NF / 3NF license
Platform and Version
Any version
OS and Architecture
Any OS
Browser
Chrome 114.0
What command did you use to deploy Portainer?
standard command and tried on multiple setups always with same result.
Additional Information
It would be great to fix the regression because I have dozens of Portainer CE pointing to my templates and they are managed by other users so I can’t control their Portainer versions.
App templates JSON v3 must be documented correctly somewhere.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 9
- Comments: 21
Commits related to this issue
- Update to now include v3 of the portainer app template Seems to be required due to https://github.com/portainer/portainer/issues/12337 — committed to JourneyOver/selfhosted_templates by JourneyOver 2 years ago
I actually wrote a simple script to fix those templates and then opened a pull request on that repo with my fixed version: https://github.com/Lissy93/portainer-templates/pull/67. Note that I didn’t alter the original file, I created a new one called
templates_v3.json. I’m just using the raw file link from my own repo in my Portainer installation: https://raw.githubusercontent.com/TomChantler/portainer-templates/refs/heads/v3/templates_v3.json. It works fine. Try it yourself.I can confirm this. i have the exact same problems with templates. In buisiness and the community version on 2 differt machines setup using Truenas Scale.
Yeah, that option works! I wonder if there will be an update to the main branch?
Same problem here - using STS - current Version 2.24.0 Templates from https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
4 months later … latest documentation is still not up to date (still documenting App Templates version 2 instead of App Templates v3).
Also, I found another regression : v3 format does not seem to support empty ENV variable anymore. They are all marked as required and I found no way to make them work with empty values.
This example is working in v2 but not in v3 :
Portainer UI marks it as Required and does not accept empty value.