Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. versionsUrl is not persisted when updating an existing custom app to a community app

versionsUrl is not persisted when updating an existing custom app to a community app

Scheduled Pinned Locked Moved Solved Support
cliversions-url
2 Posts 2 Posters 60 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • marcusquinnM Offline
    marcusquinnM Offline
    marcusquinn
    wrote last edited by girish
    #1
    • 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.json URL.

    Reproduction

    1. Start with an installed custom app where:
      • appStoreId is empty
      • versionsUrl is empty
    2. Update it through the API using:
    {
      "versionsUrl": "<PUBLIC_VERSIONS_URL>@<VERSION>",
      "skipBackup": false
    }
    
    1. The catalog resolves successfully, the backup completes, the new image is downloaded, and the update task finishes successfully.
    2. 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:
    1. Install an app as a custom app.
    2. Update it using a community versionsUrl.
    3. Wait for the update task to complete.
    4. 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

    Web Design & Development: https://www.evergreen.je
    Technology & Apps: https://www.marcusquinn.com

    1 Reply Last reply
    3
    • girishG Do not disturb
      girishG Do not disturb
      girish
      Staff
      wrote last edited by
      #2

      @marcusquinn thanks for the great report! Fixed - https://git.cloudron.io/platform/box/-/commit/caf0cc39bec12e0085e52102f7de9b9a6a68394b

      1 Reply Last reply
      3
      • girishG 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
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search