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?
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.
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.
I can confirm that when upgrading from 22.2.5 the occ and version.php files were gone. I managed to pick them up from the repo but the upgrade process is still failing.
I got this problem by updating from 25.0.1 to 25.0.3 with an Linuxserver.io Docker in unRAID.
What files do i need and where do i need to put them exactly?
Cause I put an version.php in the folder /config/www/nextcloud/updater but i got the exact same folder.
The version.php file looks like:
$OC_Version = [25, 0, 3, 2];
// The human readable string
$OC_VersionString = '25.0.3';
$OC_VersionCanBeUpgradedFrom = [
'nextcloud' => [
'25.0' => true,
'26.0' => true,
],
'owncloud' => [
'10.11' => true,
],
];
// default Nextcloud channel
$OC_Channel = 'git';
// The build number
$OC_Build = '';
// Vendor of this package
$vendor = 'nextcloud';
i am running a nextcloud linuxserver.io container on unraid. I am on 25.0.1 and want to upgrade to 25.0.4
the error i run into is this:
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 675
PHP Fatal error: Uncaught Error: Failed opening required â/config/www/nextcloud/updater/âŚ/version.phpâ (include_path=â.:/usr/share/php81â) in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php:675
Stack trace: #0 phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php(713): NC\Updater\Updater->getVersionByVersionFile() #1 phar:///config/www/nextcloud/updater/updater.phar/lib/UpdateCommand.php(371): NC\Updater\Updater->extractDownload() #2 phar:///config/www/nextcloud/updater/updater.phar/lib/UpdateCommand.php(234): NC\Updater\UpdateCommand->executeStep() #3 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Command/Command.php(255): NC\Updater\UpdateCommand->execute() #4 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run() #5 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand() #6 phar:///config/www/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun() #7 phar:///config/www/nextcloud/updater/updater.phar/updater.php(10): Symfony\Component\Console\Application->run() #8 /config/www/nextcloud/updater/updater.phar(14): require(ââŚâ) #9 {main}
thrown in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 675
root@0e9d30847bcb:/config/www/nextcloud/updater#
@b0rgi85 in my case, the issue is not occuring in /config/www/nextcloud/updater, but rather within the update file: config/www/nextcloud/updater/updater.phar/lib/Updater.php
has anyone come across a solution yet? is it isolated to this docker container from linuxserver.io potentially?
Yes, I get the nextcloud update one week earlier.
linuxserver updatet to [27.0.1-ls262] on 08-08-2023, nextcloud updated to 27.0.2 on the same day.
Now I have always to check the linuxserver.io releases about updates before I update manually via docker commands( linuxserver.io will update to 2.7.0.2 probably tomorrow).
But I understand why they removed the updater. Still it was handy.