Check for expected file

Error when updating via web interface

Nextcloud version (eg, 20.0.5): 27.1.2. (27.1.0, 27.1.1)
Operating system and version (eg, Ubuntu 20.04): RedHat 8.8
Apache or nginx version (eg, Apache 2.4.25): nginx/1.23.1
PHP version (eg, 7.4): PHP 8.1.24

The issue you are facing:

When updating via the web interface at the step:
Check for expected files.
the error is given:
The following extra files have been found:
composer.json
composer.lock
package-lock.json
package.json

the update is interrupted.
The update can be completed only after manually deleting the specified files from the ./nextcloud folder.

What needs to be done so that each update does not require manual deletion of the listed files?

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

Steps to replicate it:

  1. When updating via the web interface (version: 27.1.X Update channel:
    Stable

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 (
  'instanceid' => 'xxxxxxxx',
  'passwordsalt' => 'xxxxxxxx',
  'secret' => 'xxxxxxxx',
  'trusted_domains' =>.
  array (
    0 => 'iassist.ru',
  ),
  'datadirectory' => '/data/nextcloud-d',
  'overwrite.cli.url' => 'https://iassist.ru',
  'overwriteprotocol' => 'https',
  'dbtype' => 'mysql',
  'version' => '27.1.3.2',
  'dbname' => 'xxxxxxxx',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxxxxxxx',
  'dbpassword' => 'xxxxxxxx',
  'installed' => true,
  'mysql.utf8mb4' => true,
  'updater.release.channel' => 'stable',
  'theme' => '',
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>.
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
  ),
  'maintenance' => false,
  'loglevel' => 2,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'xxxxxxxx',
  'mail_domain' => 'xxxxxxxx',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxxxxxxx',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'xxxxxxxx',
  'mail_smtppassword' => 'xxxxxxxx',
  'enable_previews' => true,
  'enabledPreviewProviders' =>.
  array (
    0 => 'OC\\Preview\\PDF',
    1 => 'OC\\Preview\\BMP',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\JPEG',
    4 => 'OC\\Preview\\PNG',
    5 => 'OC\\Preview\\TXT',
    6 => 'OC\\Preview\\HEIC',
    7 => 'OC\\Preview\\HEIF',
    8 => 'OC\\Preview\\XBitmap',
  ),
  'updater.secret' => 'xxxxxxxx',
);

I see this problem too, and also in the upgrade to version 29 rc2.

Please post the full output of occ integrity:check-core.

Normally additional files are listed. Delete them or move them to another place. Or post details.

After the upgrade to 29 rc2, occ integrity:check-core returns no output

The files that were reported as extraneous (and have been reported as extraneous on every upgrade) are:

composer.json
composer.lock
package.json
package-lock.json

Each time I have to take the extra step of deleting them before installing the new package.

Seems to be a Docker problem.

I’m not running docker.

Sorry. Pease post full error log including parhs.

It looks like the issue is that the updater app has not been updated.

Current nextcloud has these files listed as expected in updater/index.php
but that file in my installation is from Feb 2023, and has not been updated.
I think that the nextcloud web-based updater is not updating the updater itself.

Here’s part of the updater log:

2024-04-08T21:34:13+0000 B853AwI1Pw [info] request to updater
2024-04-08T21:34:13+0000 B853AwI1Pw [info] currentStep()
2024-04-08T21:34:13+0000 B853AwI1Pw [info] show HTML page
2024-04-08T21:34:13+0000 B853AwI1Pw [info] current version: 29.0.0 RC2 build tim
e: 2024-04-04T15:17:01+00:00 b90e597325bf0b974284a7635c06f84c8ee339ef
2024-04-08T21:34:41+0000 AaKNGsDSPJ [info] request to updater
2024-04-08T21:34:41+0000 AaKNGsDSPJ [info] currentStep()
2024-04-08T21:34:41+0000 AaKNGsDSPJ [info] show HTML page
2024-04-08T21:34:41+0000 AaKNGsDSPJ [info] current version: 29.0.0 RC2 build tim
e: 2024-04-04T15:17:01+00:00 b90e597325bf0b974284a7635c06f84c8ee339ef
2024-04-08T21:34:42+0000 AaKNGsDSPJ [info] getUpdateServerResponse()
2024-04-08T21:34:42+0000 AaKNGsDSPJ [info] updaterServer: https://updates.nextcloud.com/updater_server/
2024-04-08T21:34:42+0000 AaKNGsDSPJ [info] releaseChannel: beta
2024-04-08T21:34:42+0000 AaKNGsDSPJ [info] internal version: 29.0.0.15
2024-04-08T21:34:42+0000 AaKNGsDSPJ [info] updateURL: https://updates.nextcloud.com/updater_server/?version=29x0x0x15xxxbetaxx2024-04-04T15%3A17%3A01%2B00%3A00+b90e597325bf0b974284a7635c06f84c8ee339efx8x2x7
2024-04-08T21:34:43+0000 AaKNGsDSPJ [info] getUpdateServerResponse response: Array
(
    [version] => 29.0.0.16
    [versionstring] => Nextcloud 29.0.0 RC3
    [url] => https://download.nextcloud.com/server/prereleases/nextcloud-29.0.0rc3.zip
    [web] => https://docs.nextcloud.com/server/29/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=29.0.0
    [autoupdater] => 1
    [eol] => 0
    [signature] => AkoPN+ZCuQGiqzeh7vIizdyLTONxX4uUVDOfzn+pajOgHMSYH/2vh8AU0xtY3Xpa
lnrPUgvdGxNBpaySEBEOfOrAHME4L75inw6h6Xd1LjksPd02ooPXoaNpkWNxL+B1
L1WQZv6lzdpd7NrRtVhZIVAsqEltcZ2nPLqCPq2F0M40EMAPbT0LM7mxf5kc0UqB
Y6yz8r2RSFIUJevTsDCHhQ==
)
2024-04-08T21:34:43+0000 AaKNGsDSPJ [info] end of checkForUpdate() Update to Nextcloud 29.0.0 RC3 available. (channel: "beta")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/prereleases/nextcloud-29.0.0rc3.zip</code>
2024-04-08T21:34:47+0000 wcA3RhiEOX [info] request to updater
2024-04-08T21:34:47+0000 wcA3RhiEOX [info] currentStep()
2024-04-08T21:34:47+0000 wcA3RhiEOX [info] POST request for step "1"
2024-04-08T21:34:47+0000 wcA3RhiEOX [info] startStep("1")
2024-04-08T21:34:47+0000 wcA3RhiEOX [info] checkForExpectedFilesAndFolders()
2024-04-08T21:34:47+0000 wcA3RhiEOX [error] POST request failed with UpdateException
2024-04-08T21:34:47+0000 wcA3RhiEOX [error] Exception: UpdateException
Message: 
Code:0
Trace:
#0 /var/www/nextcloud/updater/index.php(1369): Updater->checkForExpectedFilesAndFolders()
#1 {main}
File:/var/www/nextcloud/updater/index.php
Line:325
Data:
Array
(
    [0] => composer.lock
    [1] => package-lock.json
    [2] => composer.json
    [3] => package.json
)


2024-04-08T21:34:47+0000 wcA3RhiEOX [info] rollbackChanges("1")
2024-04-08T21:34:47+0000 wcA3RhiEOX [info] unlink .step
2024-04-08T21:34:47+0000 wcA3RhiEOX [info] end of  rollbackChanges()
2024-04-08T21:38:03+0000 CwjH1tOGu7 [info] request to updater
2024-04-08T21:38:03+0000 CwjH1tOGu7 [info] currentStep()
2024-04-08T21:38:03+0000 CwjH1tOGu7 [info] show HTML page

Can you find the files somewhere? Make a search for the files in your Nextcloud folder. Also it is a beta version. Maybe you can create an issue at Github if it is really a bug.