Upgrade 24 -> 25: This directory is unavailable, please check the logs or contact the administrator (shares)

Support intro

Nextcloud version: 25.0.0
Operating system and version: Linux nextcloudpi 4.14.222-odroidxu4 armv7l GNU/Linux
Apache or nginx version: Apache/2.4.38 (Debian)
PHP version: 8.1.11

The issue you are facing:

After an update from nextcloud 24 to 25 nextcloud won’t show files after clicking on the files-icon. Instead it says " This directory is unavailable, please check the logs or contact the administrator". This is only for folders that are shared with other users or contain shared files.
The recent-files list works fine, as well the “shares”-section.

I’ve tried several times

sudo -u www-data php occ files:scan --all

and

sudo -u www-data php occ files:cleanup

and

sudo -u www-data php /var/www/nextcloud/occ trashbin:cleanup --all-users

and

sudo -u www-data php /var/www/nextcloud/occ maintenance:repair

but none of them helped out the problem.

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

Steps to replicate it:

  1. Login to nextcloud
  2. click on files if base dir of the user contains a shared file or navigate to a shared folder

The output of your Nextcloud log in Admin > Logging:

no output although logging is activated (?)

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

<?php
$CONFIG = array (
  'passwordsalt' => xxx
  'secret' => 'xxx
  'trusted_domains' => 
  array (
xxx  ),
  'datadirectory' => '/media/USBdrive/ncdata',
  'dbtype' => 'mysql',
  'version' => '25.0.0.18',
  'overwrite.cli.url' => 'https://nextcloudpi/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => xxx
  'installed' => true,
  'instanceid' => xxx
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => xxx
  ),
  'tempdirectory' => '/media/USBdrive/ncdata/tmp',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => xxx
  'mail_domain' => xxx
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/media/USBdrive/ncdata/nextcloud.log',
  'data-fingerprint' => xxx
  'theme' => '',
  'loglevel' => 0,
  'mail_smtpauth' => 1,
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' =>xxx
  'mail_smtpport' => '587',
  'mail_smtpsecure' => 'tls',
  'mail_smtpname' => xxx
  'mail_smtppassword' => xxx
  'default_phone_region' => xxx
  'app_install_overwrite' => 
  array (
    0 => 'nextcloudpi',
  ),
);

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

cut

[Fri Oct 28 20:40:15.739119 2022] [ssl:error] [pid 16589] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 25671A916C625EA07DBFF6CBED5028D470B6BF72 / notbefore: Mar 28 20:59:46 2020 GMT / notafter: Mar 26 20:59:46 2030 GMT]
[Fri Oct 28 20:40:15.739253 2022] [ssl:error] [pid 16589] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Fri Oct 28 20:40:15.780336 2022] [ssl:error] [pid 16590] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 25671A916C625EA07DBFF6CBED5028D470B6BF72 / notbefore: Mar 28 20:59:46 2020 GMT / notafter: Mar 26 20:59:46 2030 GMT]
[Fri Oct 28 20:40:15.780371 2022] [ssl:error] [pid 16590] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Fri Oct 28 20:40:15.780511 2022] [http2:warn] [pid 16590] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
[Fri Oct 28 20:40:15.994506 2022] [mpm_prefork:notice] [pid 16590] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Fri Oct 28 20:40:15.994610 2022] [core:notice] [pid 16590] AH00094: Command line: '/usr/sbin/apache2'

You are using a 32bit system. Unfortunately NC 25 is not possible with a 32bit system. Not sure if your device is capable of 64bit.

I am having the same issue. Have you found a good workaround?

Thanks

According to the documentation Nextcloud v26 should require an 64bit CPU/OS/PHP…
https://docs.nextcloud.com/server/25/admin_manual/installation/system_requirements.html

So basically I’m SOL because a) I did not make a backup before upgrading and b) because I trusted the documentation (thinking I had some time to replace my old Odroid-HC1 (armhf / 32bit))? ¯_(ツ)_/¯

Or can this be fixed for v25 reminding people to buy new hardware. I’m sure there are a lot of older Raspberry Pis and similar devices out there with the same problem…

It only seems to be a problem with “files” (Webinterface + WebDAV/Sync Client) as I can still sync my Calendar fine using CalDAV.

:cry:

edit:
Commented in the in Issue 32117. Not sure if it’s the correct place for it but it really seems like the 64-Bit PHP requirement should be introduced in Nextcloud version 26 and not 25.

Also it was/is planned that one should not be able to update to Version 26 if PHP is only 32-bit. At least if I understand the Post in Issue 34692.

tl;dr: Wait for Nextcloud version 25.0.2 and Update. See https://github.com/nextcloud/server/pull/34905


Found a “quick” (and dirty?) fix.

The information about the required 64-bit PHP in the admin overview sent me the wrong way.

Actually “reading” (RTFEM - reading the ducking error message) in the Nextcloud Data folder (nextcloud.log) does help.

Then I found [Bug]: TypeError: Return value of OCA\DAV\Connector\Sabre\FilesPlugin::OCA\DAV\Connector\Sabre\{closure}() must be of the type int or null, float returned · Issue #34674 · nextcloud/server · GitHub which if you scroll down tells you about a workaround.

This is the patch that worked for me. Also had to sudo systemctl restart php7.4-fpm.service. After that everything seems to work again.

Still I have to replace the hardware but this gives me some room to breathe …

root@nextcloud:~# diff -Naur /root/var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php /var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php
--- /root/var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php	2022-11-22 18:18:57.786885186 +0000
+++ /var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php	2022-11-22 18:13:26.375521209 +0000
@@ -352,7 +352,9 @@
 			$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
 				return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
 			});
-			$propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node): ?int {
+			// https://help.nextcloud.com/t/cannot-access-files-after-upgrade-to-nextcloud-25/147823/4?u=michaing
+			// Changed ?int to ?float in line 357
+			$propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node): ?float {
 				return $node->getSize();
 			});
 			$propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) {

Quote https://github.com/nextcloud/server/issues/34674#issuecomment-1285810556

We didnt plan to actively remove 32-bit compatibility but it seems like we did for 25 without knowing as we do not test against 32-bit which is why we removed 32-bit support in the first place.