Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Trash bin: AbstractTrash::getSize() must be of the type integer, float returned #13160
Steps to reproduce
(I am unsure about this, as I cannot set up another test instance.)
The trash bin should open, showing deleted files.
In the web client, the trash bin does nothing but show the loading spinner.
Operating system: Raspbian stretch
Web server: Apache 2.4.25-3
Database: MariaDB 10.1.37-0
PHP version: PHP 7.0.30
Nextcloud version: 15.0.0
Updated from an older Nextcloud/ownCloud or fresh install: upgraded from 14.0.4, 13.0.6, 12.0.4
Where did you install Nextcloud from: zip file
List of activated apps:
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Browser: Firefox 64
Operating system: Windows 10
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Same here, fresh install Nextcloud 15. Is there a clean way to manually remove deleted files?
Same behaviour with Nextcloud 188.8.131.52.
Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type integer, float returned
This worked for me
As openterprise stated the following console command forces the trashbin to empty:
You either have to login to the nextcloud locally or via ssh.
In my case it is a nextcloudpi and it said it didn't the file occ. In that case I had to change the command to where my occ is, i. e. :
This happend right now (using nextcloud 16.0.3, tarball on Rasbian Buster with PHP 7.3). I started to upload ~8GB of files via WiFi (only images and videos <1GB), cancelled the upload, marked all files and deleted them, switched to LAN, reloaded nextcloud, startet to upload again. I couldn't open the trash bin, neither through the web interface nor the app. The upload was fine, no other errors occured.
Deleting other files moved them to the trash correctly (verified through file system access), but I couldn't delete them.
The same issue persists with NC 17 beta 1. Lost some files on the server side after the upgrade and had the same error when I tried to look into the trash bin if they are there.
Actually ~4gb would be true if if was a signed integer. For normal (unsigned) ones it is 2 147 483 647 bytes on 32 bit systems.
I am experiencing the same kind of error when downloading large folders (#12422). There the only available "fix" there is to use float instead of int as the parameter of a method and live with the integrity check error. I think it is really annoying that such an elementary bug pops up in several places where I never had problems with owncloud...
Btw, I would be prepared to help out but I have no idea where to start...
The file info class (https://github.com/owncloud/core/blob/master/lib/private/Files/FileInfo.php) states in a comment that the size of a file/folder is an int which is just not true on 32 bit systems for files/folders > 2,147,483,647 byte. The question which arises for me is, at how many other places inside the codebase this wrong assumption hides as well.