Upgrade 30.0.4 to 30.0.5 fails

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.4
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 12.9
  • Web server and version (e.g, Apache 2.4.25):
    • nginx 1.22.1-9
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx 1.22.1-9
  • PHP version (e.g, 8.3):
    • 8.2
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • During web-based upgrade
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • ?
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Upgrade fails in step 6.

Steps to replicate it (hint: details matter!):

  1. go to admin page
  2. start web-based update, then due to failure:
  3. rm /mnt/dietpi_userdata/nextcloud_data/updater-ocwmoi7mbwzu/.step
  4. cd /var/www/nextcloud/
  5. sudo -u www-data php updater/updater.phar

Log entries

[...]
Start update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[ ] Extracting ...PHP Warning:  require(/var/www/nextcloud/updater/../version.php): Failed to open stream: No such file or directory in phar:///var/www/nextcloud/updater/updater.phar/lib/Updater.php on line 699
PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/nextcloud/updater/../version.php' (include_path='.:/usr/share/php') in phar:///var/www/nextcloud/updater/updater.phar/lib/Updater.php:699
Stack trace:
#0 phar:///var/www/nextcloud/updater/updater.phar/lib/Updater.php(744): NC\Updater\Updater->getVersionByVersionFile()
#1 phar:///var/www/nextcloud/updater/updater.phar/lib/UpdateCommand.php(387): NC\Updater\Updater->extractDownload()
#2 phar:///var/www/nextcloud/updater/updater.phar/lib/UpdateCommand.php(240): NC\Updater\UpdateCommand->executeStep()
#3 phar:///var/www/nextcloud/updater/updater.phar/vendor/symfony/console/Command/Command.php(298): NC\Updater\UpdateCommand->execute()
#4 phar:///var/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#5 phar:///var/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#6 phar:///var/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#7 phar:///var/www/nextcloud/updater/updater.phar/updater.php(12): Symfony\Component\Console\Application->run()
#8 /var/www/nextcloud/updater/updater.phar(14): require('...')
#9 {main}
  thrown in phar:///var/www/nextcloud/updater/updater.phar/lib/Updater.php on line 699

This is the same error message as shown by the web updater.

I’ve been using Nextcloud for over a decade. I always do my updates this way. There have been similar failures in the past, perhaps due to timeouts? (i.e. when running from a slow HD on a Raspberry Pi, but this went away once I switched to an SSD.

The way this is stuck right now, I don’t know how to recover. Any help would be appreciated.

Update: I’ve reverted to last night’s backup, i.e. 30.0.4 - since the upgrade did not run to completion, I assume that no database changes have been applied (e.g. calendar data).

Glad I’m not the only one with this issue. Wasted a day trying to fix it. Going to hold off for now.

Tried rerunning the updater fixing issues along the way and did this with the cli updater as well with no luck. While trying over and over again at one point I was able to get past the Extracting step but then it failed on “Move files in place” and reset the entire update. Eventually I downloaded the 30.0.5 archive from Index of /server/releases, backed up my config.php, pasted the archive over my install overwriting, applied permissions to the new folder, restored my config.php backup, then ran occ upgrade. After all that my instance was working on 30.0.5 but then I had a ton of files failing the integrity check. I tried the Nc-integrity-fix script to solve this but it broke the instance instead. Not wanting this error message I gave up and restored my 30.0.4 backup.

This appears to be the error from the second run, not the original error (i.e. the one from before you deleted the .step file).

This suggests your first run got farther (far enough to remove your existing installation; which is why the version.php from it is missing). Please check your updater.log for the original run (see Updater: Troubleshooting in the Admin Manual. The original error is what would be helpful in identifying the original problem.

As for the problem now, I would suggest either:

  • Doing a manual update to recover from it (which will result in a completed update/upgrade). The process is documented here.
  • Or, alternatively, rolling back using a backup (of just your installation folder; based on what you posted it does not sound like the database migrations phase was reached).
1 Like

Thanks for the info & links. Indeed, my bad: this is the 2nd error msg, clearly files were indeed already deleted. I restored 30.0.4 from a backup, just to keep things running for now. As you point out, no database changes were made when the error occurred.

We’re moving to a new apartment right now, I’ll revisit later this month.

1 Like

Correct, it seems to be failing after it removes some of the files. For me critical files such as occ were missing for the second run. I’ll check out what the original error is sometime if nobody else does.

1 Like

FWIW, I’ve now updated to 30.0.8 - it all went smoothly this time around.