Skip to content

[Bug]: updateApp() not called when upgrading apps incompatible with server version (e.g. live-migration repair steps are ignored) #53985

@mejo-

Description

@mejo-

⚠️ This issue respects the following points: ⚠️

Bug description

\OC_App::updateApp() doesn't get called the app upgrade if the app doesn't meet the server requirements but is listed in app_install_overwrite. This results e.g. in live-migration repair steps being ignored for these apps.

That's because the app gets removed from enabled apps at

$appManager->disableApp($app, true);
unconditionally, not taking into account app_install_overwrite.

Steps to reproduce

  1. Make sure your app doesn't meet server requirements (e.g. max-version="31" but test on latest master), but is listed in app_install_overwrite.
  2. Add a live-migration repair step to the app and make sure it's listed in <repair-steps> -> <live-migration> in appinfo/info.xml
  3. Put a debugger breakpoint in
    $queue = \OC::$server->getJobList();
    and
    $apps = \OC_App::getEnabledApps();
  4. Run occ upgrade
  5. See that the first breakpoint is never reached and that in the second breakpoint, \OC_App:getEnabledApps() doesn't include your app

Expected behavior

\OC_APP::updateApp() should be called for apps where the server version constraint is overwritten.

Probably Updater::checkAppsRequirements() should check whether an app is listed in app_install_overwrite before removing it from enabled apps.

Nextcloud Server version

master

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions