"No such file or directory in ... Updater.php on line 658" during 22.2.6 to 23.0.3 update

I like NextCloud’s potential, and have been limping along with a linxuserver Docker instance for years. Unfortunately, (literally) every time I try to do an upgrade SOMETHING goes wrong. It got so bad I’ve re-installed my Docker twice just to avoid doing an update then just gave up and didn’t bother updating for a year.

Then I decided to try again, and the first 2 major version updates both failed with stuff I already knew how to fix, but the last one (to 22.2.6 → 23.0.3) threw this new issue at me:

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[ ] Extracting ...PHP Warning:  require(/config/www/nextcloud/updater/../version.php): failed to open stream: No such file or directory in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 658
PHP Fatal error:  require(): Failed opening required '/config/www/nextcloud/updater/../version.php' (include_path='.:/usr/share/php7') in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 658

Now my UI is stuck at “Update in process.”, “sudo -u abc php /config/www/nextcloud/updater/updater.phar” fails with the above, and “occ maintenance:repair” spits out “Could not open input file: /config/www/nextcloud/occ” (I checked, and indeed it doesn’t exist).

I’ve reviewed a few other posts with this error but they’re all pretty old (pre-v19) and I wasn’t able to apply them to my instance.

Are there any suggestion on how to recover this? If not, any thoughts on what I might be doing wrong at install to cause SO MUCH PAIN during updates?


Sorry i do not know if this notation is normal on using updater/updater.phar.
But the file needed is /config/www/nextcloud/version.php. Does the file exists? Can the user read the file?

Here the file for “master”
server/version.php at master · nextcloud/server · GitHub

Also this file must exist. Have you deleted files in /config/www/nextcloud?
What about e.g. /config/www/nextcloud/remote.php and /config/www/nextcloud/index.php?

I don’t recall deleting anything in /config/www/nextcloud, but maybe I did something by accident.
At this point I expect it will be faster to re-install from scratch than get the current install going again. :frowning:

As this is currently only used by me I plan to just move my “files” contents elsewhere, remove/reinstall the app & related DB then move my “files” contents back in & rescan everything. Not a fun afternoon, but it will get me running again sooner.