Update from 23.0.3 to 23.0.4 FAILS: "Updates between multiple major versions are unsupported"?

Nextcloud version 23.03.2
Operating system and version Centos 7.9
Apache or nginx version Apache 2.4.53
PHP version 7.4

Trying to do a ‘simple’ update from version 23.0.3.2 to version 23.0.4.1
The update fails with the message: “Updates between multiple major versions are unsupported”
Tried with occ upgrade, same error.

config.php file has the correct version number.
version.php has the correct version number.
php occ config:system:get version returns the correct version number.
Even the logs show the correct version numbers in reporting the update failure.

Nextcloud.log:

{"reqId":"YmWttVMVuDoXyw_RMO2EaAAAAAU","level":3,"time":"","remoteAddr":"","user":"--","app":"no app in context","method":"GET","url":"/core/ajax/update.php?requesttoken=","message":"Updates between multiple major versions and downgrades are unsupported.","userAgent":"","version":"23.0.3.2","exception":{"Exception":"Exception","Message":"Updates between multiple major versions and downgrades are unsupported.","Code":0,"Trace":[{"file":"/home/user/public_html/nextcloud/lib/private/Updater.php","line":133,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["23.0.4.1","23.0.3.2"]},{"file":"/home/user/public_html/nextcloud/core/ajax/update.php","line":194,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"/home/user/public_html/nextcloud/lib/private/Updater.php","Line":234,"CustomMessage":"Updates between multiple major versions and downgrades are unsupported."}}
{"reqId":"K9FVJ3ZcrYmZRrq5VAmy","level":3,"time":"","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Updates between multiple major versions and downgrades are unsupported.","userAgent":"--","version":"23.0.3","exception":{"Exception":"Exception","Message":"Updates between multiple major versions and downgrades are unsupported.","Code":0,"Trace":[{"file":"/home/user/public_html/nextcloud/lib/private/Updater.php","line":133,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["23.0.4.1","23.0.3"]},{"file":"/home/user/public_html/nextcloud/core/Command/Upgrade.php","line":235,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"/home/user/public_html/nextcloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/home/user/public_html/nextcloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/home/user/public_html/nextcloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"OC\\Core\\Command\\Upgrade"},{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/home/user/public_html/nextcloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/home/user/public_html/nextcloud/lib/private/Console/Application.php","line":211,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->","args":[{"__class__":"Symfony\\Component\\Console\\Input\\ArgvInput"},{"__class__":"Symfony\\Component\\Console\\Output\\ConsoleOutput"}]},{"file":"/home/user/public_html/nextcloud/console.php","line":99,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/home/user/public_html/nextcloud/occ","line":11,"args":["/home/user/public_html/nextcloud/console.php"],"function":"require_once"}],"File":"/home/user/public_html/nextcloud/lib/private/Updater.php","Line":234,"CustomMessage":"Updates between multiple major versions and downgrades are unsupported."}}{"reqId":"K9FVJ3ZcrYmZRrq5VAmy","level":3,"time":"2022-04-24T20:10:03+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::failure: Exception: Updates between multiple major versions and downgrades are unsupported.","userAgent":"--","version":"23.0.3"}
{"reqId":"K9FVJ3ZcrYmZRrq5VAmy","level":3,"time":"","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update failed","userAgent":"--","version":"23.0.3"}
{"reqId":"K9FVJ3ZcrYmZRrq5VAmy","level":1,"time":"","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"--","version":"23.0.3"}
{"reqId":"K9FVJ3ZcrYmZRrq5VAmy","level":1,"time":"","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"23.0.3"}

Strangely enough, updater.log doesn’t say anything about this error.

config.php:

  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.example.com',
    1 => 'example.com',
    2 => '127.0.0.1',
    3 => 'localhost',
    4 => '[ip-number]',
  ),
  'datadirectory' => '/home/user/data',  
  'dbtype' => 'mysql',
  'version' => '23.0.3.2',
  'overwrite.cli.url' => 'https://nextcloud.example.com:443',
  'dbname' => '',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'mail.example.com',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpport' => '465',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'example.com',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'admin@example.com',
  'mail_smtppassword' => '',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'default_phone_region' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',

There is nothing of relevance in any other system logs.

Where in the database or elsewhere does the updater get the impression that the current update is between multiple major versions?

Hi @nonhocapito,
You are missing the required support template. Please fill this form out and edit into your post.

This will give us the technical info and logs needed to help you! Thanks.

here is version.php just in case:

$OC_Version = array(23,0,3,2);
$OC_VersionString = '23.0.3';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' => 
  array (
    '22.2' => true,
    '23.0' => true,
  ),
  'owncloud' => 
  array (
    '10.5' => true,
  ),
);
$OC_Build = '2022-03-21T13:05:48+00:00 5f6449283b5eb3cd0c96f475ff6f68a6c73a8140';
$vendor = 'nextcloud';

it is identical to the file from the nextcloud 23.0.3 installation archive

Hmm, should it list 22.2 if you are on 23.x?

The main error you are seeing is because you can only migrate by one major version at a time. So, that means you cannot upgrade from 19 to 23. :thinking:

Sorry but you are not making much sense.

  1. my nextcloud version is 23.0.3 as stated multiple times, including the TITLE of the thread. I don’t know where you get 19 from

  2. what I posted is the official version.php file available in the nextcloud 23.0.3 installation, and it lists the versions that 23.0.3 can upgrade FROM, not TO;

Simply go look at your own version.php. You’ll see it lists 22 as well.

@nonhocapito Hi,

have you tried:

  • within nextcloud GUI, to change the update chanel to beta…
  • od directly $OC_Channel = 'stable';to beta

T

Are you suggesting I should install v 24 beta, or that by changing channel somehow I can fix my original problem and can upgrade to a stable version?

(I switched to beta, but I am still offered 23.0.4 for the time being.)

Ok, did not work for you…

Sorry, no clue.

Anybody who can help with this…?
I need some insight on how the Nextcloud updater establishes what version is it going to update.
Other than the config file and version.php I suppose there might be something in the database?

After another failed attempt, I found a workaround (NOT a solution).

Seeing that the update didn’t require database upgrade, and the files were already in place (the update fails at the second stage, after all files have been copied), I went into config.php and changed the version from 23.0.3.2 to 23.0.4.1.

Then in the database I went into the _appconfig table and emptied the configvalue fields in relation to updates , such as lastupdateResultand lastupdatedat.

Now Nextcloud appears to be version 23.0.4.1, and offers 24 rc2 as an update.

2022-04-27 18_08_30

We’ll see how things go when I attempt to update again.

I want to do what the OP did (upgrade from 23.03 to 23.04). Has it been determined that this is a systemic problem and is the method that the OP had to use (manually manipulate versions) to make it work what all of us will need to do? The silence reagrding whether this is a problem makes people like me (and I assume others) worried about whether this is a problem or not. Can a dev or someone related to Nextcloud clarify if what this poster had to do is the workaround for a known or unknown problem.

For me the workaround given by nonhocapito also did not work.
But Its possible, that there is a little error in my installation: the script (in updater.php) looks for $this->config->getAppValue(‘core’, ‘vendor’, ‘’), which was not setted in my system. So I set this value directly within the database by
“insert into _appconfig values (‘core’, ‘vendor’, ‘nextcloud’)”
so now the upgrade worked!

That’s a good clue. I also don’t have that record in _appconfig

Here is the SQL I ran to add it:

INSERT INTO oc_appconfig (appid, configkey, configvalue) VALUES ('core', 'vendor', 'nextcloud');

I don’t dare to update to v 24 to check if I am golden now. Later.

@GerdSc and @iamhives was this on a relatively recent installation, with a newly created database?

I started using nextcloud version 11 or 12 some years ago …
No, the database was not newly created.

Mine is quite new, so not a pattern. I thought maybe a newer version might have forgotten adding an entry. But it doesn’t make much sense anyway.

Right now in a second nextcloud installation, which should be the same like the installation used above, the config key “vendor” already exists.
wonder, wonder