26.0.1 upgrade error from command line

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): 26.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52 (Ubuntu)
PHP version (eg, 7.4): PHP 8.1.2-1ubuntu2.11 (cli) (built: Feb 22 2023 22:56:18) (NTS)

The issue you are facing:
Upgrading via command line fails, with the following:

# sudo -u www-data php /var/www/html/nextcloud/updater/updater.phar
Nextcloud Updater - version: v26.0.0beta2-9-g64e2e4c dirty

Current version is 26.0.0.

Update to Nextcloud 26.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-26.0.1.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 failed
The following extra files have been found:
    .tag
    .mailmap
    .eslintrc.js
    .gitattributes
    .php-cs-fixer.dist.php
    .gitmodules
    .codecov.yml
    .pre-commit-config.yaml
    .scrutinizer.yml
    .idea
    .editorconfig
    .npmignore
    .devcontainer
    .github
    .jshintrc
    .gitignore
    .eslintignore
    .git
    .tx
    .drone.yml

Update failed. To resume or retry just execute the updater again.

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

The output of your Nextcloud log in Admin > Logging:

N/A

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 => '<REDACTED>',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '26.0.0.11',
  'overwrite.cli.url' => '<REDACTED>',
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'FR',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '<REDACTED>',
  'installed' => true,
  'instanceid' => 'ocn0zlaga1tb',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => '<REDACTED>',
  'mail_domain' => '<REDACTED>',
  'mail_smtphost' => '<REDACTED>',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '<REDACTED>',
  'mail_smtppassword' => '<REDACTED>',
);

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

N/A

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.

2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] updater cli is executed
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] currentStep()
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] current version: 26.0.0 build time: 2023-03-21T09:23:03+00:00 62cfd3b4c9ff4d8cdbbe6dcc8b63a1085bb94e3d
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] getUpdateServerResponse()
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] updaterServer: https://updates.nextcloud.com/updater_server/
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] releaseChannel: stable
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] internal version: 26.0.0.11
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] updateURL: https://updates.nextcloud.com/updater_server/?version=26x0x0x11xxxstablexx2023-03-21T09%3A23%3A03%2B00%3A00+62cfd3b4c9ff4d8cdbbe6dcc8b63a1085bb94e3dx8x1x2
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] getUpdateServerResponse response: Array
(
    [version] => 26.0.1.1
    [versionstring] => Nextcloud 26.0.1
    [url] => https://download.nextcloud.com/server/releases/nextcloud-26.0.1.zip
    [web] => https://docs.nextcloud.com/server/26/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=26.0.1
    [autoupdater] => 1
    [eol] => 0
    [signature] => DamwyvEgJU084dQyuT75FbW0Ae019eCKJzmXUrPwSnW0EBOBn8glA1/lvTIYcqMH
pBrUTcbtOHpa45Y+hma2QXFCu5CeijX29314/9y5fLUNwTSbLyxd3JCN+XMEOz2c
DWIgtNvJa65/puWL3Fsj/ECaKoshnNhhdxS4Zau2fC17HgZNhbM1YvIRHRbvErsV
4avngST5XyLyaPWe/KI8GdQVZhVuDpmTa/XNQQ1y3esJkD8i9HaLM8A9/pzXTqv2
B2l/MzsxiGbu8KDp7upj3+uqNatEmS7VvA+a1Afuz+gNrJCx/KbZV33RFhQNAqwm
YChgDMK2mgiJ2mjb3Dvv4Q==
)

2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] checkForUpdate() Array
(
    [version] => 26.0.1.1
    [versionstring] => Nextcloud 26.0.1
    [url] => https://download.nextcloud.com/server/releases/nextcloud-26.0.1.zip
    [web] => https://docs.nextcloud.com/server/26/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=26.0.1
    [autoupdater] => 1
    [eol] => 0
    [signature] => DamwyvEgJU084dQyuT75FbW0Ae019eCKJzmXUrPwSnW0EBOBn8glA1/lvTIYcqMH
pBrUTcbtOHpa45Y+hma2QXFCu5CeijX29314/9y5fLUNwTSbLyxd3JCN+XMEOz2c
DWIgtNvJa65/puWL3Fsj/ECaKoshnNhhdxS4Zau2fC17HgZNhbM1YvIRHRbvErsV
4avngST5XyLyaPWe/KI8GdQVZhVuDpmTa/XNQQ1y3esJkD8i9HaLM8A9/pzXTqv2
B2l/MzsxiGbu8KDp7upj3+uqNatEmS7VvA+a1Afuz+gNrJCx/KbZV33RFhQNAqwm
YChgDMK2mgiJ2mjb3Dvv4Q==
)

2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] getChangelogURL()
2023-04-24T10:52:05+0000 46gYwVnxJ6 [info] end of checkForUpdate() Update to Nextcloud 26.0.1 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-26.0.1.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#26-0-1" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2023-04-24T10:52:06+0000 46gYwVnxJ6 [info] updater started
2023-04-24T10:52:06+0000 46gYwVnxJ6 [info] executeStep request for step "1"
2023-04-24T10:52:06+0000 46gYwVnxJ6 [info] startStep("1")
2023-04-24T10:52:06+0000 46gYwVnxJ6 [info] checkForExpectedFilesAndFolders()
2023-04-24T10:52:06+0000 46gYwVnxJ6 [error] executeStep request failed with UpdateException
2023-04-24T10:52:06+0000 46gYwVnxJ6 [error] Exception: NC\Updater\UpdateException
Message: 
Code:0
Trace:
#0 phar:///var/www/html/nextcloud/updater/updater.phar/lib/UpdateCommand.php(366): NC\Updater\Updater->checkForExpectedFilesAndFolders()
#1 phar:///var/www/html/nextcloud/updater/updater.phar/lib/UpdateCommand.php(240): NC\Updater\UpdateCommand->executeStep()
#2 phar:///var/www/html/nextcloud/updater/updater.phar/vendor/symfony/console/Command/Command.php(255): NC\Updater\UpdateCommand->execute()
#3 phar:///var/www/html/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#4 phar:///var/www/html/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#5 phar:///var/www/html/nextcloud/updater/updater.phar/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#6 phar:///var/www/html/nextcloud/updater/updater.phar/updater.php(10): Symfony\Component\Console\Application->run()
#7 /var/www/html/nextcloud/updater/updater.phar(14): require('...')
#8 {main}
File:phar:///var/www/html/nextcloud/updater/updater.phar/lib/Updater.php
Line:291
Data:
Array
(
    [0] => .tag
    [1] => .mailmap
    [2] => .eslintrc.js
    [3] => .gitattributes
    [4] => .php-cs-fixer.dist.php
    [5] => .gitmodules
    [6] => .codecov.yml
    [7] => .pre-commit-config.yaml
    [8] => .scrutinizer.yml
    [9] => .idea
    [10] => .editorconfig
    [11] => .npmignore
    [12] => .devcontainer
    [13] => .github
    [14] => .jshintrc
    [15] => .gitignore
    [16] => .eslintignore
    [17] => .git
    [18] => .tx
    [19] => .drone.yml
)


2023-04-24T10:52:06+0000 46gYwVnxJ6 [info] rollbackChanges("1")
2023-04-24T10:52:06+0000 46gYwVnxJ6 [info] unlink .step
2023-04-24T10:52:06+0000 46gYwVnxJ6 [info] end of  rollbackChanges()

What do you not understand about this message:

These 20 listed files somehow ended up in the webroot (e.g. through unclean work). These should therefore be deleted as they do not belong there. Then simply start the update again.

Well, those ended up there put by Nextcloud itself (I’ve installed it via command line).
That’s what I don’t understand: how they ended up there?
I’ve tried the web installer but it wasn’t working.

EDIT:
Never mind. Apparently that’s because I’ve used git instead a tar/zip file.

Sorry for the noise and for the dumbness :slight_smile: