Upgrade failed, no details shown

Nextcloud version (eg, 20.0.5): 27.1.6
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.4): 8.1

The issue you are facing:
I want to upgrade Nextcloud to the presented version 28.0.2. This has worked just before on another server, and now it fails for this one. I tried using the web-based updater as always. But also occ doesn’t do anything now.

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

Steps to replicate it:

  1. Use the web-based updater
  2. Or call occ upgrade

The output of your Nextcloud log in Admin > Logging:

What is that? Can't find it.

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

$CONFIG = array (
  'passwordsalt' => '****',
  'secret' => '****',
  'trusted_domains' =>
  array (
    0 => '****',
  'datadirectory' => '****',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '****',
  'htaccess.RewriteBase' => '/',
  'dbname' => '****',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '****',
  'dbpassword' => '****',
  'installed' => true,
  'instanceid' => '****',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => '****',

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

Doesn't exist.

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.
Doesn’t exist.

Details you didn’t ask for:

The web-based updater at first stopped with a failure in the step “extract”. I could retry but it would just show the same again, stopping at “extract”. I went back to the application and restarted the upgrade from the admin settings page. Now it already stops at “Check for expected files”. There’s just a red cross in front of it, no additional information.

Meanwhile I also tried calling php occ upgrade, but it would just say “Nextcloud is already latest version”.

Am I now locked to this version forever? Why is upgrade failing? Can’t it tell me what the problem is?

Those are completely different things.

If you want to run the command line updater (the command line counterpart of the web based updater) then you should run:

sudo -u www-data php -f /var/www/nextcloud/updater/updater.phar

as described → here in the Manual ←

Nextcloud is available as a gift, but not for free!
The minimum compensation is the in-depth study of the documentation!

Much and good luck,

1 Like

Sorry, I was under the impression that this was the CLI version as it was recommended in the UI. I didn’t write the Nextcloud code so I’m not familiar with the implementation details of the upgrade process. I’m just a user doing regular upgrades who is happy if nothing broke this time.

In-depth study of the documentation and user-friendly application doesn’t quite match. (Guess I was misled by instructions in the UI, hence not looking for other information.) As did the error messages that were anything but helpful. But I don’t want to complain. Thank you for your hint, today the upgrade has worked with this CLI command.

Do you recall where/what you saw that lead you to this?[1] Or do you have any suggestions that might have made things clearer? Maybe there is an opportunity to clean up the interface or messaging.

I think there’s a note in the web updater to run occ upgrade if one wishes to finish the final part at the CLI rather than in the web interface (same appears when running the updater.phar from the CLI if you don’t wish to have it trigger that step for you).

[1] You wouldn’t be the first. People run occ upgrade all the time and get confused why it refuses to update their instance. The naming of the two halves of the update process are probably not ideal. :slight_smile:

Yes, I guess it was during the web upgrade process. I remembered that the CLI upgrade was recommended to avoid timeouts, but such issues do not exist on my servers. (PHP config doesn’t force a timeout, and the databases are really small.)

I don’t know the differences between these two CLI commands, but from my observations I would infer that the updater.phar checks for new versions online and downloads them, whereas the occ upgrade would only apply an already downloaded archive. Is this correct?

In that case I’d question the need to separate the two. Would it hurt to always check for a new version online?

If that separation is necessary, a hint with the occ upgrade command might help. Don’t just state that this is already the latest version (which it wasn’t), but rephrase it to make clear that no online check or download was involved when making that statement, and that the other command might need to be called before this. Then the UI labelling could be as misleading as it wants, the CLI tools would set it straight again.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.