YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
147 stars 63 forks source link

Upgrade failed due to PHP version not compatible #617

Closed RubusFruticosus74 closed 9 months ago

RubusFruticosus74 commented 11 months ago

Describe the bug

Upgrade from nextcloud 25.0.4\~ynh1 to 27.1.2.\~ynh2 failed with error: "This version of Nextcloud is not compatible with PHP>=8.2. You are currently running 8.2.11.+ ynh_exit_properly"

Note

I just ran system update (which updates PHP8.2) before running Nextcloud update so maybe the test on minor version of PHP should be higher? Thanks in advance :-)

Full Log

Full log here for 14 days

derDieDasJojo commented 11 months ago

I have the same problem. Until this is fixed I was able to update at least to 27.1.1 with this command: sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/a5964f1fdf559205211038626bf772ba8ad3b75a

derDieDasJojo commented 11 months ago

Afterwards I had to do the following post-upgrade steps: 1) disable maintainance mode in config/config.php 2) create a directory via mkdir /var/www/nextcloud/custom_apps and make nextcloud:www-data the owner chown nextcloud:www-data /var/www/nextcloud/custom_apps 3) upgrade the db (by reloading the website and confirming to start the db upgrade

I am not sure, if this is because of my custom configuration or everyone has to do this after the command i posted above - so i thought i just let you know.

autra commented 11 months ago

The initial problem: the version of php is decided by the next nextcloud_ynh version (the one you want to upgrade to), but the upgrade command still runs on the old version of occ, that don't support php8.2 yet.

Also, the upgrade guide says that we cannot skip major version when upgrading nextcloud. We should also wait for background migrations to be done before attempting next step.

So the correct upgrade path for us would probably be:

Ideally, the ynh package should prevent us to upgrade 2 major versions at once.

I'm going to test this upgrade path and report back.

autra commented 11 months ago

I needed to disable he application phone sync (ocsms) (not maintained any more and doesn't supports php8.2), but apart from that, this process worked perfectly for me.

mzed2k commented 11 months ago

Hello,

also the update Nextcloud (nextcloud) from 25.0.6~ynh1 to 27.1.2~ynh3 fails on my Raspberry Pi 4. See log: https://paste.yunohost.org/raw/ijetaxaxeb and the thread on the YNH forum: https://forum.yunohost.org/t/upgrading-nextcloud-from-25-0-4-to-27-1-2-fails/26751/3

The yunohost nextcloud upgrade only offers the latetes NC version. How do I upgrade to 26.0.3?

Any ideas?

ericgaspar commented 11 months ago

@mzed2k There is a branch for 26.0.7~ynh1:

sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/oldstable
mzed2k commented 11 months ago

@ericgaspar Thanks a lot! I didn't know that. I'll give it a try and report back.

zamentur commented 9 months ago

This bug should be fixed in testing.

RubusFruticosus74 commented 9 months ago

Thanks for all your help on this isssue, I tested the @mzed2k solution (sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/oldstable) and it works on my server. Great job!