You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleted files not working after upgrade to Nextcloud 15 #13005
Can't access files in trash bin after upgrade to NC 15.
TypeError: Argument 2 passed to OCA\Files_Trashbin\Trash\TrashItem::__construct() must be of the type string, null given, called in /var/www/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php on line 62
Nextcloud 15.0.0
Ubuntu 16.04
PHP 7.0.32
Reacted by Andreas Klöckner, binarious, Jonathan Springer, Christoph Kieser and danielb
I have this error too, and I too can't access my Trashcan. I get a circle of death when I try to access the deleted files, and the log entry is repeated.
TypeError: Argument 2 passed to OCA\Files_Trashbin\Trash\TrashItem::__construct() must be of the type string, null given, called in /var/www/html/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php on line 62
Nextcloud 15.0.0
Ubuntu 16.04 (running in an LXC container)
PHP 7.2
I was unable to fix this by restarts / re-logging in etc., so I deleted the account and re-created it. That works again. Not a great solution, but it's working again SO FAR.
UPDATED: Same error re-surfaced, so it's looking to be quite a chronic problem. Deleting accounts and re-opening is not much fun, so I am stuck with this until a fix is issued.
As a workarround you can delete the trashbin with the occ command.
For Ubuntu und other Debian based systems that should be: sudo -u www-data php occ trashbin:cleanup --all-users
If you don't want to loose your files in the trashbin you can backup, the data folder, or more specific you only have to backup the files_trashbin folder, in each user directory in the data folder.
Reacted by Andrew Wilson, binarious, Dmitriy Pozdeiev, danielb, Brad, Gabriele Belluardo, Nick Sweeting, Daniel Scharmach and Shucach
Same problem here with Nextcloud 15.0.2 with the error :
TypeError: Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type integer, float returned
Thanks a lot for the workaround.
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php The current PHP memory limit is below the recommended value of 512MB. Remove deleted files for all users Remove deleted files for users on backend Database User1
Unfortunately I face the same problem with what @dnclain mentioned above. I updated manually from 15.0.2 to 15.0.4, and the error message after a "spinning circle" request for the trash bin starts with"message":{"Exception":"TypeError","Message":"Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type integer, float returned","Code":0,"Trace":[{"file":"/path_to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":98,"function":"getSize","class":"OCA\Files_Trashbin\Sabre\AbstractTrash","type":"->","args":[]}`
I accidently removed a bunch of files and no (easy) way to undo this.
Is there an alternate way / workaround to restore deleted directories (preserving directory structure) from trash?
Reacted by bcutter, Robert Breithuber and Yuri Andrei Gelsleichter
Activity
Wizlonex commentedon Dec 16, 2018
I have this error too, and I too can't access my Trashcan. I get a circle of death when I try to access the deleted files, and the log entry is repeated.
TypeError: Argument 2 passed to OCA\Files_Trashbin\Trash\TrashItem::__construct() must be of the type string, null given, called in /var/www/html/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php on line 62
Nextcloud 15.0.0
Ubuntu 16.04 (running in an LXC container)
PHP 7.2
I was unable to fix this by restarts / re-logging in etc., so I deleted the account and re-created it. That works again. Not a great solution, but it's working again SO FAR.
UPDATED: Same error re-surfaced, so it's looking to be quite a chronic problem. Deleting accounts and re-opening is not much fun, so I am stuck with this until a fix is issued.
christophfroehlich commentedon Dec 19, 2018
This seems to be related with #13160 and happens here, too.
Freshdouble commentedon Dec 19, 2018
As a workarround you can delete the trashbin with the occ command.
For Ubuntu und other Debian based systems that should be:
sudo -u www-data php occ trashbin:cleanup --all-usersIf you don't want to loose your files in the trashbin you can backup, the data folder, or more specific you only have to backup the files_trashbin folder, in each user directory in the data folder.
Wizlonex commentedon Dec 20, 2018
Very useful to know that - will save me deleting accounts and getting them re-created - thanks Freshdouble.
maghog commentedon Dec 20, 2018
Thanks, works as a workaround...
pozdeiev commentedon Jan 10, 2019
New Nextcloud 15, same thing.
janLo commentedon Jan 12, 2019
I have the same Problem when I deleted or moved files in a synchronized folder. Doing this directly in the web ui works fine.
dnclain commentedon Jan 18, 2019
Same problem here with Nextcloud 15.0.2 with the error :
TypeError: Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type integer, float returned
Thanks a lot for the workaround.
AfroUSApl commentedon Jan 22, 2019
This helped me on my Nextcloud 15.0.2
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.phpThe current PHP memory limit is below the recommended value of 512MB.Remove deleted files for all usersRemove deleted files for users on backend DatabaseUser1janLo commentedon Jan 23, 2019
This helps only temporary. As soon as there are files moved again in a synchronized folder it happens again.
icewind1991 commentedon Jan 29, 2019
can you see if #13886 fixes the problem
maghog commentedon Jan 30, 2019
Yes #13886 fix the problem.
Thanks!
atsag commentedon Feb 21, 2019
Unfortunately I face the same problem with what @dnclain mentioned above. I updated manually from 15.0.2 to 15.0.4, and the error message after a "spinning circle" request for the trash bin starts with"message":{"Exception":"TypeError","Message":"Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type integer, float returned","Code":0,"Trace":[{"file":"/path_to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":98,"function":"getSize","class":"OCA\Files_Trashbin\Sabre\AbstractTrash","type":"->","args":[]}`
rpellerin commentedon Mar 4, 2019
I've got the same exact problem as @atsag on 15.0.5
hannesbe commentedon Mar 5, 2019
Ditto @atsag here on 15.0.5
I accidently removed a bunch of files and no (easy) way to undo this.
Is there an alternate way / workaround to restore deleted directories (preserving directory structure) from trash?
Gelsleichter commentedon Aug 5, 2019
Same thing here, I want to recover from bin.