versionsUrl is not persisted when updating an existing custom app to a community app
-
- Cloudron 9.2.0, CLI 8.2.6
- Update succeeds using versionsUrl
- Package and backup complete normally
- Subsequent app inspection still returns versionsUrl: ""
- Source trace:
- routes/apps.js resolves and passes versionsUrl
- apps.js copies it into updateConfig
- apptask.js persists appStoreId but omits versionsUrl
- Expected fix: persist updateConfig.versionsUrl alongside appStoreId
- No private domain, app ID, or credentials
I attempted to convert an existing custom/dev app into a community app by updating it through a valid
CloudronVersions.jsonURL.Reproduction
- Start with an installed custom app where:
appStoreIdis emptyversionsUrlis empty
- Update it through the API using:
{ "versionsUrl": "<PUBLIC_VERSIONS_URL>@<VERSION>", "skipBackup": false }- The catalog resolves successfully, the backup completes, the new image is downloaded, and the update task finishes successfully.
- Fetch the app again through GET /api/v1/apps/<APP_ID>.
Actual result
The package is updated successfully, but the app still reports:
{
"versionsUrl": ""
}
It therefore remains classified as a custom app and cannot receive automatic community-catalog updates.
Expected result
After a successful update using versionsUrl, the app should persist the base catalog URL in apps.versionsUrl, matching the behaviour of an app initially installed through a community catalog.
Source trace
In Cloudron 9.2.0:
- routes/apps.js resolves the catalog and assigns the base URL to data.versionsUrl.
- apps.js copies data.versionsUrl into updateConfig.versionsUrl.
- apptask.js persists updateConfig.appStoreId, but does not persist updateConfig.versionsUrl.
Around the final configuration update in apptask.js:
if ('memoryLimit' in updateConfig) values.memoryLimit = updateConfig.memoryLimit;
if ('appStoreId' in updateConfig) values.appStoreId = updateConfig.appStoreId;
+if ('versionsUrl' in updateConfig) values.versionsUrl = updateConfig.versionsUrl;
A regression test could:
- Install an app as a custom app.
- Update it using a community versionsUrl.
- Wait for the update task to complete.
- Assert that the base versionsUrl is persisted and check_update uses that catalog.
As confirmation of the diagnosis, conditionally setting only the missing versionsUrl field made the app’s normal update check use the community catalog successfully.
#bugs #apps #updates #community-apps
-
@marcusquinn thanks for the great report! Fixed - https://git.cloudron.io/platform/box/-/commit/caf0cc39bec12e0085e52102f7de9b9a6a68394b
-
G girish has marked this topic as solved
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login