Is there a way to skip the check for expected files in the web updater or add the folder to the expected files list?

Nextcloud version (eg, 20.0.5): Nextcloud 24.0.4
Operating system and version (eg, Ubuntu 20.04): Debian 11.4 or 11.5
Apache or nginx version (eg, Apache 2.4.25): NGINX nginx/1.22.0
PHP version (eg, 7.4): PHP 8.0.22 (cli)

The issue you are facing:

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

Steps to replicate it:

  1. Create a new directory called data2 in the Nextcloud root
  2. Mount it using sshfs to a remote location
  3. Try updating Nextcloud
  4. Edit /usr/share/nginx/html/updater/index.php and add ‘data2’ next to each entry of ‘data’
  5. Edit nginx.conf to include to send 404 to data2 in the url too.

The output of your Nextcloud log in Admin > Logging:

nothing of value

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

only change being that the datadirectory was changed to data2

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

2022/09/10 16:59:42 [error] 18906#18906: *1634 upstream timed out (110: Connection timed out) while reading response header from upstream, client: IPHERE, server: example.org, request: "POST /updater/index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "example.org"

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.

doesn’t contain anything of value

The backup step threw out a 504 error as well! It was in HTML for some reason.

Also if I try to go hard to the updater I get the following:

Step 3 is currently in process. Please reload this page later.

P.S: the error I get thru every step is

<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>

I managed to get to the step Delete Old Files by just retrying 2-5 times.

UPDATE:

Now it only shows that my Nextcloud is updating this is way too slow, how do I fix this now? :frowning:

UPDATE2:

Now it’s stuck at supposedly still updating and the occ and other files are not available rn :frowning:

UPDATE3:
I found this in the updater.log in data2:

2022-09-10T19:30:23+0200 GHduP2HqOM [error] POST request failed with other exception
2022-09-10T19:30:23+0200 GHduP2HqOM [error] Exception: Exception
Message: core/shipped.json is not available
Code:0
Trace:
#0 /usr/share/nginx/html/updater/index.php(1390): Updater->deleteOldFiles()
#1 {main}
File:/usr/share/nginx/html/updater/index.php
Line:929

It’s an old topic, but I reply, because other people searching with Google might find it useful.

In my server configuration (with suexec and php-fcgi) I need to have a “cgi-bin” in the “public_html” directory. Therefore, I could not upgrade nextCloud due to this extra directory.

Looking at the source code of updater/index.php , I can see that the list of expected files is extended using the “custom app paths”.

So, the workaround is to define a “custom app” path in the config/config.php file:

‘apps_paths’ =>
array (
0 =>
array (
‘path’ => ‘/home/nextcloud/public_html/apps’,
‘url’ => ‘/apps’,
‘writable’ => true,
),
1 =>
array (
‘path’ => ‘/home/nextcloud/public_html/cgi-bin’,
‘url’ => ‘/cgi-bin’,
‘writable’ => false,
),
),

Note that the path name must be canonical (PHP realpath). It must not contain a symlink’ed path.

Please also note that there is a bug in the documentation
https://docs.nextcloud.com/server/latest/admin_manual/apps_management.html
OC::$SERVERROOT cannot be used because neither class “OC” now “\OC” is available in config.php.
(Reported here [Bug]: Documentation contains non-available OC::$SERVERROOT · Issue #40460 · nextcloud/server · GitHub )