Nextcloud issue after updating no longer showing files


bullseye 0

Linux RaspberryPi-4 5.15.76-v7l+ #1597 SMP Fri Nov 4 12:14:58 GMT 2022 armv7l GNU/Linux

RPi 4 Model B (armv7l)

Using original Raspberry supplied power supply.

SD Card (not sure of make too lazy to check)


I recently updated my Nextcloud to the latest version using Nextcloud’s web updater and I am no longer able to see any of my files. I know they still exist on the Raspberry Pi as I can see the folders and their contents under /mnt/dietpi_userdata/nextcloud_data/. I have checked that the folders are all owned by www-data. In the logs under the Administrator account for nextcloud I see the following error:

Error	webdav	TypeError: Return value of OCA\DAV\Connector\Sabre\FilesPlugin::OCA\DAV\Connector\Sabre\{closure}() must be of the type int or null, float returned

Thanks for any help in solving this problem.


You upgraded to Nextcloud 25, right? This is a known issue with 32bit OS:

There is a fix available:

Or you change to the ARMv8 (64bit) image, but this needs more effort and time, but it is more future proof.

1 Like

Thanks Jappe for the info this was the problem.

I will probably just apply the fix for now as I am too lazy to move over to 64 bit.

The probably better solution btw is to remove the type hint completely (as it was until NC25). Here is a patch I use:

--- /var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php     2022-11-04 21:33:58.396903454 +0100
+++ FilesPlugin.php     2022-11-04 21:38:24.397614131 +0100
@@ -352,7 +352,7 @@
                        $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 {
+                       $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node) {
                                return $node->getSize();
                        $propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) {

Save this to a file like nextcloud.patch, then it can be applied safely after every Nextcloud update like this:

patch /var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php /path/to/nextcloud.patch

The update to Nextcloud 26 will be blocked for 32-bit systems btw, so this is only for subversions.

Yes 32bit will be a dead-end road as there will be no further major release for Nectcloud on this platform.

NC26 will probably even drop PHP7.4 (Bullseye) support: On the roadmap: deprecation of PHP 7.4 - 🚧 Installation - Nextcloud community

We’re definitely not going to add Ondrej’s PHP repo again, but ship last supported Nextcloud version based on distro/PHP version. And I’ll work on last glitches with Bookworm, so we can start structured public testing when first freeze state has reached in 2023-01-12: bookworm Freeze Timeline and Policy

1 Like

Thanks for the follow up info Michalng and Joulinar.

I was in no hurry to switch to 64-bit on my Pi as it did not really seem to offer me anything extra over x86. WIth Nextcloud being dropped for 32-bit systems though maybe it is time to make the effort.

I am currently running Urbackup, VirtualHere, Fail2Ban, Certbot, WireGuard and OpenSSH will all of these be ok running on 64-bit?

If so I think I will switch over to 64-bit at the sametime the new release of DietPi 8.11 hits us. :slight_smile:

Just want to say thank you for all of your hard work on what I consider the best OS for the Raspberry Pi.

You could switch at any time, there is no need to wait on next DietPi release.

And yes, all your apps should be able to work.