Update from 23.0.3 to 24.0.0 failed - Updates between multiple major versions and downgrades are unsupported

Hello,
I’ve updated my server instance from nextcloud 23.0.3 to 24.0.0. After I’ve copied the config.php and deleted in the file file line " ‘version’ => ‘22.2.3.0’,", i started the nginx service. Then I’ve got the following message in the browser:

Aktualisierung auf 24.0.0

Exception: Updates between multiple major versions and downgrades are unsupported.
Detaillierte Protokollmeldungen
Update vorbereiten
Log-Level auf “debug” gesetzt
Wartungsmodus eingeschaltet
Exception: Updates between multiple major versions and downgrades are unsupported.
Das Update war nicht erfolgreich. Für mehr Informationen lese bitte diesen Forenbeitrag zu diesem Thema.

[root@tmp]# sudo -u http php /usr/share/webapps/nextcloud/occ status
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

  • installed: true
  • version: 24.0.0.12
  • versionstring: 24.0.0
  • edition:
  • maintenance: false
  • needsDbUpgrade: true
  • productname: Nextcloud
  • extendedSupport: false

Copy paste this into your post and please fill it out.

Support intro

Nextcloud version (eg, 20.0.5): 23.0.3 - update to 24.0.0
Operating system and version (eg, Ubuntu 20.04): archLinux 2022-05
Apache or nginx version (eg, Apache 2.4.25): nginix 1.20.2
PHP version (eg, 7.4): 8.1.5

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:
Upgrade the server package manually

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oci767iflnur',
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxxxxx',
  'trusted_domains' =>
  array (
    0 => 'xxxx',
  ),
  'datadirectory' => '/nextcloudDATA/data',
  'default_phone_region' => 'DE',
  'auth.bruteforce.protection.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'dbtype' => 'mysql',
  'overwrite.cli.url' => 'xxxx',
  'dbname' => 'nextcloudDB',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'xxxx',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxx',
  'mail_smtpport' => 'xxx',
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xxx',
  'log_type' => 'file',
  'logtimezone' => 'Europe/Berlin',
  'logfile' => '/nextcloudDATA/data/log/nextcloud.log',
  'loglevel' => 2,
  'log_rotate_size' => 20971520,
  'syslog_tag' => 'Nextcloud',
  'remember_login_cookie_lifetime' => 1800,
  'session_lifetime' => 43200,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
    3 => '.DS_Store',
    4 => '.Trashes',
    5 => '.TemporaryItems',
  ),
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
    10 => 'OC\\Preview\\PDF',
  ),
  'maintenance' => false,
  'theme' => '',
  'config_is_read_only' => false,
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"ePVhtzgh7XFKyu6fDHoi","level":3,"time":"2022-05-08T08:18:32+02:00","remoteAddr":"xxxxxxx","user":"--","app":"no app in context","method":"GET","url":"/core/ajax/update.php?requesttoken=yQmkP4wkaCSzud9gOCJgFsIHiTf6TXqMwl3z8BzisKQ%3D%3As1nNUdRTLlX47vAzU1cXRpVM2WewfAjtoQm%2FqXKT2Oo%3D","message":"Updates between multiple major versions and downgrades are unsupported.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0","version":"","exception":{"Exception":"Exception","Message":"Updates between multiple major versions and downgrades are unsupported.","Code":0,"Trace":[{"file":"/usr/share/webapps/nextcloud/lib/private/Updater.php","line":133,"function":"doUpgrade","class":"OC\\Updater","type":"->"},{"file":"/usr/share/webapps/nextcloud/core/ajax/update.php","line":194,"function":"upgrade","class":"OC\\Updater","type":"->"}],"File":"/usr/share/webapps/nextcloud/lib/private/Updater.php","Line":234,"CustomMessage":"Updates between multiple major versions and downgrades are unsupported."}}
{"reqId":"ePVhtzgh7XFKyu6fDHoi","level":3,"time":"2022-05-08T08:18:32+02:00","remoteAddr":"xxxxxx","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=yQmkP4wkaCSzud9gOCJgFsIHiTf6TXqMwl3z8BzisKQ%3D%3As1nNUdRTLlX47vAzU1cXRpVM2WewfAjtoQm%2FqXKT2Oo%3D","message":"\\OC\\Updater::failure: Exception: Updates between multiple major versions and downgrades are unsupported.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0","version":""}
{"reqId":"ePVhtzgh7XFKyu6fDHoi","level":3,"time":"2022-05-08T08:18:32+02:00","remoteAddr":"xxxxxxx","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=yQmkP4wkaCSzud9gOCJgFsIHiTf6TXqMwl3z8BzisKQ%3D%3As1nNUdRTLlX47vAzU1cXRpVM2WewfAjtoQm%2FqXKT2Oo%3D","message":"\\OC\\Updater::updateEnd: Update failed","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0","version":""}
{"reqId":"ePVhtzgh7XFKyu6fDHoi","level":1,"time":"2022-05-08T08:18:32+02:00","remoteAddr":"xxxxxxx","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=yQmkP4wkaCSzud9gOCJgFsIHiTf6TXqMwl3z8BzisKQ%3D%3As1nNUdRTLlX47vAzU1cXRpVM2WewfAjtoQm%2FqXKT2Oo%3D","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0","version":""}
{"reqId":"ePVhtzgh7XFKyu6fDHoi","level":1,"time":"2022-05-08T08:18:32+02:00","remoteAddr":"xxxxxxxxx","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=yQmkP4wkaCSzud9gOCJgFsIHiTf6TXqMwl3z8BzisKQ%3D%3As1nNUdRTLlX47vAzU1cXRpVM2WewfAjtoQm%2FqXKT2Oo%3D","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0","version":""}

What can I do to finished the installation?

Kind regards
Mathias

Hi @WesBorland, you have to update to 23.0.4 (https://nextcloud.com/changelog/#latest23) before update your server to 24.0 version

1 Like

i’m not really sure about this… should be possible to updating from 23.0.3 as well.
but i was stumnling across

where did that one come from? why it wasn’t changed when TS updated to 23.0.3?

anyways… apparently something went wrong and I think the easiest way to solve this problem: restore backup you took ahead of updating to 24. and then start again without manually editing stuff.

Hi @JimmyKater ,
i don’t know why the version is in the configuration. The last working version of my nextcloud was 23.0.3.

Is anyone here who is familiar with database-Querys (mysql, mariadb)?
Ich think there is an wrong entry in the database.

Kind regards
Mathias

That is my problem.
Before I updated to NC 24, my nextcloud 23.0.3 are not working because i’ve updated my php to 8.1.x and so, the nextcloud are stop working. I hoped that the update to NC 24 are my “Rescue”

to me it kinda seems as if update to NC23 wasn’t finished successfully neither. So… updating process usually makes an automatic backup. Why not using one of these?

I mean it’s a funny idea to think that a no working instance would kinda heal itself rather than making the problematic installation work and then upgrade.

Anyways I’d go back to your last working NC-installation… and thus would downgrade php 8.1 to 7.4