Update problem - Deadlock?

Nextcloud version (eg, 20.0.5): 26.0.1 and ‘24.0.4.1’
Operating system and version (eg, Ubuntu 20.04): linux386/docker
Apache or nginx version (eg, Apache 2.4.25): in official docker image
PHP version (eg, 7.4): 8.1.19

The issue you are facing:

Im running nextcloud in a container. Because of many problems with updates, I have runned nextcloud V24.0.4.1 for a while w/o update. Now because of some security problems I have updated the docker container to nextcloud:latest (was V26.0.1).
As expected the “./occ upgrade” fails with “Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed”
Now I have downgraded the nextcloud container to nextcloud:25.
But the container permanently restarts with the message “Can’t start Nextcloud because the version of the data (26.0.1.1) is higher than the docker image version (25.0.7.1) and downgrading is not supported. Are you sure you have pulled the newest image version?”

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

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'trusted_proxies' => NULL,
  'overwritehost' => 'xx.xx.de:42443',
  'overwriteprotocol' => 'https',
  'instanceid' => 'ocsl8vb29jld',
  'passwordsalt' => 'xxxxxxxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => '127.0.0.1:42001',
  ),
  'datadirectory' => '/var/www/html/data',
 'dbtype' => 'mysql',
  'version' => '24.0.4.1',
  'overwrite.cli.url' => 'http://192.168.178.137:42001',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.178.137:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'loglevel' => 0,
  'maintenance' => true,
  'theme' => '',
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'xxxx.de',
  'mail_smtphost' => 'smtp.xxx.de',
  'mail_smtpport' => '465',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xx@xx.de',
  'mail_smtppassword' => 'xxxx',
);

How can I remove this deadlock?

Regards
Erich

OK! I have found the solution by myself.

The file version.php was already updated by Version 26.0. and here the newest version was listed.
As the value separator is ‘,’ and not dot ‘.’ I didn’t find that with fgrep. :frowning:

Here the content of version.php

<?php
$OC_Version = array(26,0,1,1);
$OC_VersionString = '26.0.1';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' =>
  array (
    '25.0' => true,
    '26.0' => true,
  ),
  'owncloud' =>
  array (
    '10.11' => true,
  ),
);

I changed it to

<?php
$OC_Version = array(24,0,4,1);
$OC_VersionString = '24.0.4';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' =>
  array (
    '24.0' => true,
    '25.0' => true,
  ),
  'owncloud' =>
  array (
    '10.11' => true,
  ),
);

And I was able to start nextcloud V25.x, update to V25, and to start V26 afterwards.

But, why did the program renew the file version.php and only afterwards found out that an update is not possible and stopped the update. This should not be the case.