Update stuck on step 6 "Extracting"

Nextcloud version : 20.0.4
Operating system and version : CentOS 8 Stream
Apache or nginx version : 2.4.37
PHP version (eg, 7.4): 7.4.14

The issue you are facing:
I’m trying to update my nextcloud instance from 20.0.4 to 20.0.6. But it get stuck on step 6 “Extracting”.
I’ve tryed with updater.phar and I got that error :
[ ] Extracting …PHP Warning: require(/var/www/html/nextcloud/updater/…/version.php): failed to open stream: No such file or directory in phar:///var/www/html/nextcloud/updater/updater.phar/lib/Updater.php on line 658
PHP Fatal error: require(): Failed opening required ‘/var/www/html/nextcloud/updater/…/version.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in phar:///var/www/html/nextcloud/updater/updater.phar/lib/Updater.php on line 658

I’ve checked if nextcloud get the permission everywhere. From /var/www, html is owned by
apache in 755. I used -R too set those permissions everywhere in nextcloud.
I’ve also checked SELinux, good too. I’ve even disabled it, still issues.

I rebooted my system and now it’s just stuck on “Step 6 is currently in prgress”.

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

Steps to replicate it:

  1. Connect in SSH
  2. sudo -u apache php updater.phar

The output of your Nextcloud log in Admin > Logging:

Can't access

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

$CONFIG = array (
  'passwordsalt' => 'something',
  'secret' => 'something',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'something',
    2 => 'something',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.4.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'something',
  'dbpassword' => 'something',
  'installed' => true,
  'instanceid' => 'something',
  'overwritehost' => 'something',
  'overwriteprotocol' => 'https',
  'overwrite.cli.url' => 'something',
  'maintenance' => true,
  'theme' => '',
  'loglevel' => 2,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'something',
  'mail_domain' => 'gmail.com',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '465',
  'updater.release.channel' => 'stable',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpname' => 'something',
  'mail_smtppassword' => 'something',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0,
    'dbindex' => 0,
  ),
  'updater.secret' => 'something',

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

Nothing related to that issue is showed in the logs

Thanks for your help.

I don’t know how that happened… But here is a weird solution in case some people encounter this.
SELinux : Disabled.
chown apache:apache /var/www/html/ -R
chmod 755 /var/www/html/ -R

Launching again the updater :
[ ] Extracting …PHP Warning: require(/var/www/html/nextcloud/updater/. ./version.php): failed to open stream: No such file or directory in phar:///var/www/html/nextcloud/updater/updater.phar/lib/Updater.php on line 658
PHP Fatal error: require(): Failed opening required ‘/var/www/html/nextcloud/updater/. ./version.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in phar:///var/www/html/nextcloud/updater/updater.phar/lib/Updater.php on line 658

The version.php in nextcloud folder is missing
Download the package from the nextcloud website and copy “version.php” on your instance. Edit the version to match with what you have. (Don’t forget to set the rights to the file)

core/shipped.json is missing
Download the package from the nextcloud website and copy “version.php” on your instance. Edit the version to match with what you have. (Don’t forget to set the rights to the file)

The update script could run fine after those files added. Idk how they go deleted from my server.

2 Likes