Trouble updating from 25.0.1 to 25.0.2 Uncaught Error: Failed opening required '/config/www/nextcloud/updater/../version.php

Nextcloud version (eg, 20.0.5): 25.0.1 to 25.0.2
Operating system and version (eg, Ubuntu 20.04): Manjaro
Apache or nginx version (eg, Apache 2.4.25): I'm not sure how to find this!
PHP version (eg, 7.4): Not sure how to find this (I use 3 docker images NC, MariaDB, and Swag, all provided by linuxserver.io

The issue you are facing:
I can’t update to 25.0.2 from 25.0.1. My usual update routine is check for new updates, use the web-ui updater, and if something goes wrong, Google around til i figure it out, which usually means using the CLI updater. This isn’t working this time. So, I googled around and found post here on the forum that says that “The solution is ALWAYS to delete the Nextcloud update folder mv data/updater-occ* ../DELETEME-updater”. But that didnt’ work, so I switched to the manual updater. that didn’t work. Found post number 106321 (linked below), and can’t make sense of the solution, so I’m turning to you guys for help.

I’m using a linuxserver.io docker image along with mariadb and swag. I’ve been using this setup for years now, so the install is fairly old. The update.log goes back to 2021.1. I built the NAS device, using Manjaro, not some purpose-built OS.

Very similar sounding problem, but I can’t seem to follow the steps to resolve it. The OP says that some files were missing from his server, and then downloaded those files to fix the problem because a) dir structure seems different from mine in ways that I can reconciliate and b) I can’t figure out where to download the missing files. I’ve dug around on github, and I can’t find them (maybe because my dir structure is different).

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

Steps to replicate it:

  1. Install Docker images listed above
  2. Steadily update install according to directions until 25.0.1 (there were some pain points when switching from letsencrypt to swag)
  3. Update from 25.0.1 to 25.0.2 via the webui
  4. Delete the /data/update folder per directions on this website
  5. attempt update via CLI
  6. Repeat last steps several times
  7. Google search and forum search for similar problems

The output of your Nextcloud log in Admin > Logging:

Can't login

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

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'NotSureIfPrivate',
  'passwordsalt' => 'Private',
  'secret' => 'IAssumePrivate',
  'trusted_domains' => 
  array (
    0 => 'private.private.net',
    1 => 'ProbablyDon'tNeedToCensorButDidAnyway',
  ),
  'dbtype' => 'mysql',
  'version' => '25.0.1.1',
  'overwrite.cli.url' => 'Valid.censored.Url',
  'dbname' => 'nextcloud',
  'dbhost' => 'mariadb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'Censored',
  'dbpassword' => 'Censored',
  'installed' => true,
  'maintenance' => true,
  'trusted_proxies' => 
  array (
    0 => 'swag',
  ),
  'loglevel' => 0,
  'mail_from_address' => 'Censored',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'Censored',
  'mail_smtphost' => 'Censored',
  'mail_smtpport' => '587',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'Censored',
  'mail_smtppassword' => 'DefinitelyCensored.',
  'theme' => '',
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'updater.secret' => '$Censored',
);

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

Couldn't find anything relevant 

output from CLI update attempt:

# docker exec -it nextcloud updater.phar
WARNING: Error loading config file: /root/.docker/config.json: read /root/.docker/config.json: is a directory
Nextcloud Updater - version: v25.0.0beta3-17-gef6cf2d

Current version is 25.0.1.

Update to Nextcloud 25.0.3 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-25.0.3.zip
Open changelog ↗

Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done

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(/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/php8') 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
# 

Possibly relevent section of docker logs:

s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
[ls.io-init] done.
s6-rc: info: service 99-ci-service-check successfully started
Could not open input file: /config/www/nextcloud/cron.php
Could not open input file: /config/www/nextcloud/cron.php
Could not open input file: /config/www/nextcloud/cron.php
Could not open input file: /config/www/nextcloud/cron.php
Could not open input file: /config/www/nextcloud/cron.php
Could not open input file: /config/www/nextcloud/cron.php


Would it be easier to just reinstall while preserving the data? I’m the only user of this system.

Thanks for any help.