Skip to content

fix(installer): re-enable version-incompatible apps after appstore update - #60591

Open
miaulalala wants to merge 1 commit into
masterfrom
fix/installer-reenable-disabled-app-after-update
Open

fix(installer): re-enable version-incompatible apps after appstore update#60591
miaulalala wants to merge 1 commit into
masterfrom
fix/installer-reenable-disabled-app-after-update

Conversation

@miaulalala

Copy link
Copy Markdown
Contributor

Summary

  • When a Nextcloud server is upgraded to a new major version, apps incompatible with the old version range are automatically disabled. Updating such an app via the web UI or occ app:update would upgrade the files but leave the app disabled, requiring a manual re-enable or reinstall.
  • updateAppstoreApp() now checks whether the app was disabled due to version incompatibility before downloading the update. After a successful upgradeApp(), if those conditions were true, enableApp() is called automatically.
  • Adds debug logging to previously-silent return false paths in isUpdateAvailable() (git-installed app, no newer version, app not in store) — this was causing update failures to appear as "keine Hinweise" (no hints) in debug logs.

Context

Reported in nextcloud/files_mindmap#269 — users upgrading from NC 31 to NC 32+ had files_mindmap auto-disabled during the server upgrade (old version declared max-version="31"). Clicking "Update" in the web UI downloaded the new compatible release but did not re-enable the app, so it remained invisible/broken until manually re-enabled.

cc @AndyScherzinger

Test plan

  • New unit tests in tests/lib/InstallerTest.php cover the four cases: re-enable on incompatible-disabled, no re-enable on compatible-disabled (manually disabled), no re-enable on already-enabled, no re-enable when upgrade itself fails
  • Manual test: install an app with max-version below current NC, trigger server upgrade to auto-disable it, then update via web UI and confirm the app is re-enabled
  • Check debug log output now shows specific reason when isUpdateAvailable() returns false

🤖 Generated with Claude Code

@miaulalala miaulalala self-assigned this May 19, 2026
@miaulalala miaulalala added this to the Nextcloud 35 milestone May 19, 2026
@miaulalala
miaulalala force-pushed the fix/installer-reenable-disabled-app-after-update branch 3 times, most recently from 2503f7a to ce489a2 Compare May 19, 2026 21:39
@AndyScherzinger
AndyScherzinger force-pushed the fix/installer-reenable-disabled-app-after-update branch from ce489a2 to 3819f43 Compare August 2, 2026 09:11
@AndyScherzinger
AndyScherzinger force-pushed the fix/installer-reenable-disabled-app-after-update branch from 3819f43 to 29fbe63 Compare August 10, 2026 11:05

@AndyScherzinger AndyScherzinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

successfully tested. With this branch I am able to active i.e. the files_mindmap app from v33 max to a new version up to v35 version range on a v35 server with having dropped in the v33 max version first.


{"reqId":"IEqIbEHPliZh4De0HshB","level":0,"time":"2026-08-10T11:16:10+00:00","remoteAddr":"192.168.21.3","user":"admin","app":"updater","method":"POST","url":"/ocs/v2.php/apps/appstore/api/v1/apps/update","scriptName":"/ocs/v2.php","message":"App files_mindmap is disabled; incompatible with NC 35.0.0.1: yes","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0","version":"35.0.0.1","data":{"app":"updater"}}


{"reqId":"IEqIbEHPliZh4De0HshB","level":1,"time":"2026-08-10T11:16:12+00:00","remoteAddr":"192.168.21.3","user":"admin","app":"updater","method":"POST","url":"/ocs/v2.php/apps/appstore/api/v1/apps/update","scriptName":"/ocs/v2.php","message":"Re-enabling files_mindmap after update: it was disabled due to version incompatibility","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0","version":"35.0.0.1","data":{"app":"updater"}}

@miaulalala
miaulalala marked this pull request as ready for review August 10, 2026 11:21
@miaulalala
miaulalala requested a review from a team as a code owner August 10, 2026 11:21
@miaulalala
miaulalala requested review from Altahrim, icewind1991, salmart-dev and sorbaugh and removed request for a team August 10, 2026 11:21
@miaulalala

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@miaulalala

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@miaulalala

Copy link
Copy Markdown
Contributor Author

/backport to stable32

@miaulalala miaulalala added 3. to review Waiting for reviews feature: apps management AI assisted and removed 2. developing Work in progress labels Aug 10, 2026
@miaulalala
miaulalala force-pushed the fix/installer-reenable-disabled-app-after-update branch 2 times, most recently from 8081af9 to 5b91ccf Compare August 11, 2026 07:52
…pdate

When a Nextcloud server is upgraded to a new major version, apps incompatible
with the old version range are automatically disabled. Previously, updating
such an app via the web UI (or occ app:update) would download and upgrade the
app files but leave the app disabled, requiring a manual re-enable or
reinstall.

updateAppstoreApp() now checks whether the app was disabled due to version
incompatibility before downloading the update. After a successful upgradeApp(),
if those conditions were true, enableApp() is called automatically.

Also adds debug logging to previously-silent return paths in
isUpdateAvailable() (git-installed apps, no newer version found, app not in
store), making update failures diagnosable from debug logs.

Signed-off-by: Anna Larch <anna@nextcloud.com>
Assisted-by: ClaudeCode:claude-opus-5
@miaulalala
miaulalala force-pushed the fix/installer-reenable-disabled-app-after-update branch from 5b91ccf to 51208d3 Compare August 11, 2026 15:18
@miaulalala
miaulalala requested a review from kesselb August 12, 2026 06:57
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants