Update not possible due to extra files

Nextcloud version: 20.0.2
Operating system and version: Ubuntu 18.04 LTS
Apache or nginx version: Apache/2.4.29 (Ubuntu)
PHP version: 7.4.13

The issue you are facing:

When I want to upgrade my instance, I get the following error:

The following extra files have been found:

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. Open Nextcloud updater
  2. Click Update
  3. extra files are found

The files all looo like this (I removed the individual salts in it because I don’t know if someone can do something bad with it.

header('Set-Cookie: ocr2cdvk3w52=some_cookie;', false);
header('Set-Cookie: oc_sessionPassphrase=blablablabla', false);
header('Set-Cookie: __Host-nc_sameSiteCookielax=true;', false);
header('Set-Cookie: __Host-nc_sameSiteCookiestrict=true;', false);
header('Location: /');

What are those?

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

$CONFIG = array (
  'passwordsalt' => 'i wont tell',
  'secret' => 'I wont tell',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'cloud.example.com',
  'datadirectory' => '/var/www/vhosts/example.com/.nextcloud/data/some-string',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud_1f5fb5af',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncuser_1f5fb5af',
  'dbpassword' => 'I wont tell',
  'installed' => true,
  'instanceid' => 'ocr2cdvk3w52',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'cloud',
  'mail_domain' => 'krc-kartracing.de',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mx.example.com',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'cloud@example.com',
  'mail_smtppassword' => 'my_secret',

The handling of extra files is being addresses in this forum at least once per week, so that the search function of this forum should have instantly provided the right answer to you :wink:

So, move the extra files out of the Nextcloud document root folder (or delete it) and try the update again.

While I do know how to handle it in general, I am more interested if these files are somehow from the Nextcloud system or are something else. If so, maybe my system has been compromised which will then lead to further action.

I’m not aware of a mechanism that create such files.