Web Updater not working

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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:

Nextcloud version (eg, 20.0.5): 24.0.7
Operating system and version (eg, Ubuntu 20.04): TrueNAS 13.0U2
Apache or nginx version (eg, Apache 2.4.25): Caddy 2.5.2
PHP version (eg, 7.4): PHP 8.0

The issue you are facing:
Can’t update through the web interface or command line. It seem to think all the steps to update are already done. All the steps to update have a green check before I do anything. Update button goes to immediately to the main page. The log files have could not verify token errors. I am able to login to NC as admin without issue that I know of.

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

Steps to replicate it:

  1. Try to update NC version with the update button
  2. or Issue OCC command to update NC

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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

<?php
$CONFIG = array (
  'passwordsalt' => 'redacted',
  'secret' => 'redacted',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'cloud.mydomain.com',
    2 => '192.168.5.81',
  ),
  'datadirectory' => '/mnt/files',
  'dbtype' => 'mysql',
  'version' => '24.0.7.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'redacted',
  'installed' => true,
  'instanceid' => 'redacted',
  'logtimezone' => 'America/New_York',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud.log',
  'loglevel' => '2',
  'logrotate_size' => '104847600',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'htaccess.RewriteBase' => '/',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'redacted',
  'mail_domain' => 'gmail.com',
  'mail_smtpauth' => '1',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'redacted',
  'mail_smtppassword' => 'redacted',
  'mail_smtphost' => 'smtp.gmail.com',
  'maintenance' => false,
  'overwriteprotocol' => 'https',
  'overwritehost' => 'cloud.mydomain.com',
  'default_phone_region' => 'US',
  'overwrite.cli.url' => 'https://cloud.mydomain.com',
  'theme' => '',
  'data-fingerprint' => 'redacted',
  'trusted_proxies' => 
  array (
    0 => '192.168.5.81',
    1 => 'localhost',
    2 => 'cloud.mydomain.com',
    3 => '::1',
  ),
  'updater.secret' => 'redacted',
);

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

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Error	core	Tried to log in admin but could not verify token

Did you install NC as TrueNAS app? How do you normally update apps from the TrueNAS ecosystem? Perhaps you have to do it differently than through the Nextcloud web-updater. I don’t know that and before we are not sure about that, I wouldn’t start to fiddle around how to update it directly if that breaks perhaps something from using it within TrueNAS.

I’ve always used the web updater without issue. For some reason the updater seem to think the update is already done as it has a check make next to each step before the process starts. The Nextcloud is installed in an iocage jail and has been working perfectly including updating to 24.0.7 my current version.

I tried updating from the cmd line. The steps to be executed are already check off.

su -m www -c 'php /usr/local/www/nextcloud/updater/updater.phar'
Nextcloud Updater - version: v24.0.0beta3-1-g67bf13b dirty

Current version is 24.0.7.

Update to Nextcloud 24.0.8 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-24.0.8.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

Continue 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
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] y
Nextcloud is already latest version

Keep maintenance mode active? [y/N] n
Maintenance mode already disabled

Maintenance mode is disabled

I ran this command and after it was done the update was able to run

su -m www -c 'php occ maintenance:repair'