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

Specific incompatibility of a NC app (e.g. Mail) blocks overall NC upgrade without explicit warning #590

Open
oleole39 opened this issue Jul 24, 2023 · 3 comments

Comments

@oleole39
Copy link

oleole39 commented Jul 24, 2023

Describe the bug

Nextcloud upgrade fails when activated Nextcloud Mail app (or any other app?) is not compatible with the new Nextcloud version, without providing an explicit warning to the YNH admin.

Context

I had the case detailed on that topic of YNH forum, using a VPS hosting YNH 11.2.3, updating from Nextcloud 26.0.2~ynh3 to Nextcloud 27.0.1~ynh1.
Reading the relatively old issue #372, I wonder whether this is I wonder whether this is only specific to Mail app.

Steps to reproduce

  • Install Nextcloud 26.0.2~ynh3.
  • Install Nextcloud app Mail v.2.2.7 (not compatible with Nextcloud 27)
  • Try updating Nextcloud via YNH updater (either SSH or webadmin):
    • It will fail unless you disable Mail app or update it, but you will not get notified explicitely about the reason.
    • The only clue will be a line in the log (coming at the end of the process when the update script tries to enable all Nextcloud apps again) saying DEBUG - App "Mail" cannot be installed because it is not compatible with this version of the server.

Expected behavior

I can think of 4 main approaches:

  1. Always leave Mail app disabled after update (thus removing the detection fix implemented at the event of the migration from NC 19 to NC 20 - maybe NC 27 changed in a way that this fix would not be working anymore). But that will break access to mail for users while the admin does not update/re-enable the Mail app.
  2. Always (as per the scope of this issue) mark upgrade as successful and do not revert the process but leave Mail app disabled, and add a specific warning (ynh_print_warn()) about the issue in the log.
  3. Check for app compatibility before upgrading NC and warn or cancel if Mail is not compatible.
  4. Check for app compatibility and auto update Mail app if required before upgrading NC.

I guess having a configuration option to allow choosing between 3 or 4 would be the ideal way, but I assume that would be more work than 1 or 2.

Regarding the app compatiblity check, below are a few resources:

Logs

https://paste.yunohost.org/raw/uvaziwofij

@arthurlutz
Copy link

arthurlutz commented Jun 6, 2024

I think I got this error too :

  - 2024-06-06 13:58:49,274: DEBUG - ++ ynh_app_setting get nextcloud phpversion
  - 2024-06-06 13:58:49,275: DEBUG - ++ set +o xtrace
  - 2024-06-06 13:58:49,415: DEBUG - + phpversion=8.2
  - 2024-06-06 13:58:49,415: DEBUG - + [[ 8.2 != \8\.\2 ]]
  - 2024-06-06 13:58:49,416: DEBUG - + cd /var/www/nextcloud
  - 2024-06-06 13:58:49,417: DEBUG - ++ filter_boring_occ_warnings
  - 2024-06-06 13:58:49,418: DEBUG - + ynh_exec_as nextcloud php8.2 --define apc.enable_cli=1 occ --no-interaction --no-ansi app:enable mail
  - 2024-06-06 13:58:49,418: DEBUG - ++ sed -E 's@\s*([0-9]+\/[0-9]+\s+\[(-|>|=)+\]\s+[0-9]+%|\s*Starting ...|Nextcloud or one of the apps require upgrade - only a limited number of commands are available|You may use your browser or the occ upgrade command to do the upgrade)@@g'
  - 2024-06-06 13:58:49,418: DEBUG - + local user=nextcloud
  - 2024-06-06 13:58:49,419: DEBUG - + shift 1
  - 2024-06-06 13:58:49,419: DEBUG - ++ whoami
  - 2024-06-06 13:58:49,421: DEBUG - + [[ nextcloud = root ]]
  - 2024-06-06 13:58:49,421: DEBUG - + sudo -u nextcloud php8.2 --define apc.enable_cli=1 occ --no-interaction --no-ansi app:enable mail
  - 2024-06-06 13:58:50,385: DEBUG - App "Mail" cannot be installed because the following dependencies are not fulfilled: PHP with a version lower than 8.1 is required.
  - 2024-06-06 13:58:50,410: DEBUG - + ynh_exit_properly


in the webUI I got another message :

File /var/www/nextcloud/config/config.php has been manually modified since the installation or last upgrade. So it has been duplicated in [snip]

Removing the application and trying another upgrade. (Does any know if disabling the application is enough in this case ? )

@oleole39
Copy link
Author

oleole39 commented Jun 7, 2024

Removing the application and trying another upgrade. (Does any know if disabling the application is enough in this case ? )

At the time it worked, as noted in my message above. What about you?

@arthurlutz
Copy link

Yes it worked : disabled, removed, upgrade, reinstalled (and config persisted so worked out of the box!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants