After upgrading to Nextcloud version 25 today, I was no longer able to access my files (using the files app).
I started getting the following error: This directory is unavailable, please check the logs or contact the administrator
The error in the logs that seems to be causing the issues is:
[webdav] Error: TypeError: Return value of OCA\DAV\Connector\Sabre\FilesPlugin::OCA\DAV\Connector\Sabre\{closure}() must be of the type int or null, float returned at <<closure>>
0. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php line 95
OCA\DAV\Connector\Sabre\FilesPlugin->OCA\DAV\Connector\Sabre\{closure}("*** sensitive parameters replaced ***")
1. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php line 356
Sabre\DAV\PropFind->handle()
2. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
OCA\DAV\Connector\Sabre\FilesPlugin->handleGetProperties()
3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1052
Sabre\DAV\Server->emit()
4. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 984
Sabre\DAV\Server->getPropertiesByNode()
5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1662
Sabre\DAV\Server->getPropertiesIteratorForPath()
6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1647
Sabre\DAV\Server->writeMultiStatus()
7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 346
Sabre\DAV\Server->generateMultiStatus()
8. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
Sabre\DAV\CorePlugin->httpPropFind()
9. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
Sabre\DAV\Server->emit()
10. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
Sabre\DAV\Server->invokeMethod()
11. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
Sabre\DAV\Server->start()
12. /var/www/nextcloud/apps/dav/lib/Server.php line 360
Sabre\DAV\Server->exec()
13. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
OCA\DAV\Server->exec()
14. /var/www/nextcloud/remote.php line 167
require_once("/var/www/nextcl ... p")
PROPFIND /remote.php/dav/files/user/
from 192.168.1.1 by user at 2022-10-19T18:44:57+00:00
The nextcloud instance is running on a Raspberry Pi 4B, another relevant warning that I get in the admin settings overview is:
It seems like you are running a 32-bit PHP version. Nextcloud needs 64-bit to run well. Please upgrade your OS and PHP to 64-bit! For further details read the documentation page about this ↗.
I have already tried running occ files:scan --all but that did not solve the problem unafortunately.
Same problem here since the update to NC25. Some new infos? Only thing i can add: If you add new users they have the normal access to their files, but existing users befor the update don’t have the file/folder access
Same problem since I upgraded yesterday to version 25 - had been running perfectly for several years before that. It looks like I have this problem with the Windows desktop client only. The Android client and the web interface still work.
As the error message suggests this seems to be a type error. So to find a possible cause for this error I followed the traceback down to
/var/www/nextcloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php - line 356:
That is:
$propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node): ?int {
return $node->getSize();
});
Here, somewhat simplified, Nextcloud seems to request the size of an object and expects this property as an integer value while getSize() returns a float.
Consequently I changed the expectation from ?int to ?float just to see what happens… Reloaded the tab in Firefox—et voilá: my home directory is available again. Maybe these hints can help.
Please note, that I didn’t do any deeper investigation (,yet) so maybe there are side effects which don’t jump up on a quick glance: let’s see, what the developers work out
Thanks for the workaround, I changed the file in my docker volume and I can now access my files again. I am looking into upgrading to 64bit anyway so that will hopefully fix long term.
CPU Architecture and OS
A 64bit CPU and 64bit OS is required for Nextcloud to run well.
I am not sure about a fresh build but to me this defect means that nextcloud doesn’t run at all let alone well.
I think either the supported OS pages need updating to state that 64bit is required or this defect needs fixing.
What does anyone else think?
Update: I see there was another update on the defect ticket saying that it was an unintentional change to break 32bit versions. I’ve added a comment on there that the official System Requirements should be updated
It looks like the issue with automatic int=>float conversion that previously existed on trashbin with >2 GiB data inside (of was it >2 GiB individual file size) now happens in the files app as well.
Also desktop client sync is affected for the same reason.
64-bit support was formally dropped due to the trashbin error, and also e.g. that >2 GiB couldn’t be downloaded via web interface on 32-bit systems, but those issues were acceptable for many 32-bit system users, including me. But the core functionality broken now is a real problem.
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.
Thanks a lot!
For those who like me are using the docker version on Raspberry Pi 32 bits, it’s not that easy to fix because there is no vi nor nano in the image and you cannot install it directly. I followed this path:
docker exec -it nextcloud bash # change nextcloud to the name of your image
That workaround bought some time. Migration has to happen until October 2023 according to Maintenance and Release Schedule · nextcloud/server Wiki · GitHub when support for NC v25 ends (the last major release series supporting NO working with 32 bit platforms… somehow, most of the time, if lucky).