Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not fail hard if no appinfo is returned during update #9008

Merged
merged 1 commit into from
Apr 3, 2018

Conversation

juliusknorr
Copy link
Member

Fix for #8964

Before that the updater was failing hard when the appinfo of an enabled app could not been fetched. Now we just disable that app and continue.

Steps to reproduce:

  1. Enable some app
  2. Delete the appinfo.xml file from the app
  3. Increase server version to trigger update
  4. Try to update

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@kyrofa
Copy link
Member

kyrofa commented Mar 28, 2018

This changes the upgrade error that I see, but I'm still getting an error (upgrading from 13.0.1 to this PR):

Mar 28 11:15:38 Pandora nextcloud.apache[8773]: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: You may use your browser or the occ upgrade command to do the upgrade
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: Set log level to debug
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: Turned on maintenance mode
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: Updating database schema
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: Updated database
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: UnexpectedValueException: The files of the app "activity" were not correctly replaced before running the update
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: Update failed
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: Maintenance mode is kept active
Mar 28 11:15:38 Pandora nextcloud.apache[8773]: Reset log level

I suppose it makes sense given this PR, but I don't really know what it means. Should that app have been disabled instead?

@nickvergessen
Copy link
Member

Should that app have been disabled instead?

No, you need to ensure that you uploaded the new update correctly and that all files are readable by the www-data user

@MorrisJobke
Copy link
Member

No, you need to ensure that you uploaded the new update correctly and that all files are readable by the www-data user

That is caused because it is a shipped app and you deleted one of it's files. Thus we know that there happened something bad. For other apps we are not that confident and thus just disable them. (just for the background of this.

Shipped apps are defined in here:

https://github.com/nextcloud/server/blob/master/core/shipped.json#L2-L37

If you remove the line with "activity" then the upgrade should run and disable the activity app.

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 3, 2018
@MorrisJobke MorrisJobke merged commit 75cf631 into master Apr 3, 2018
@MorrisJobke MorrisJobke deleted the disable-if-no-appinfo branch April 3, 2018 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: install and update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants