Nextcloud Trashbin

Hello everyone. I got a little problem with my Nextcloud. Every time I try to open the “trash-folder” it only says “This directory is not available, please check the log files or contact the administrator”. Where can I change the configuration for the directory? And where can I see the log files?

Oh I found the log files :smiley: Here is it:
[remote] Error: TypeError: Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type int, float returned at <>

  1. /var/www/nextcloud/apps/files_trashbin/lib/Sabre/PropfindPlugin.php line 78
    OCA\Files_Trashbin\Sabre\AbstractTrash->getSize()
  2. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php line 98
    OCA\Files_Trashbin\Sabre\PropfindPlugin->OCA\Files_Trashbin\Sabre{closure}("*** sensitive parameters replaced ***")
  3. /var/www/nextcloud/apps/files_trashbin/lib/Sabre/PropfindPlugin.php line 79
    Sabre\DAV\PropFind->handle("{http://owncloud.org/ns}size", Closure {})
  4. <>
    OCA\Files_Trashbin\Sabre\PropfindPlugin->propFind(Sabre\DAV\PropFind {}, OCA\Files_Trashbin\Sabre\TrashFolder {})
  5. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([OCA\Files_Trash … "], [Sabre\DAV\PropF … }])
  6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1059
    Sabre\Event\EventEmitter->emit(“propFind”, [Sabre\DAV\PropF … }])
  7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 981
    Sabre\DAV\Server->getPropertiesByNode(Sabre\DAV\PropFind {}, OCA\Files_Trashbin\Sabre\TrashFolder {})
  8. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1666
    Sabre\DAV\Server->getPropertiesIteratorForPath(“trashbin/ncp/trash”, ["{http://nextcl … "], 1)
  9. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 355
    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)
  10. <>
    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\Reque … "}, Sabre\HTTP\Response {})
  11. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},“httpPropFind”], [Sabre\HTTP\Requ … }])
  12. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit(“method:PROPFIND”, [Sabre\HTTP\Requ … }])
  13. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque … "}, Sabre\HTTP\Response {})
  14. /var/www/nextcloud/apps/dav/lib/Server.php line 317
    Sabre\DAV\Server->exec()
  15. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  16. /var/www/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/var/www/nextcl … p")

PROPFIND /remote.php/dav/trashbin/ncp/trash
from 176.95.177.255 by ncp at 2020-04-07T08:53:03+00:00

Hi, had the same issue with new 18.0.3 version on HC2 image from NextcloudPI. This helped for me (read in issue #13160):

  • Workaround (include (int) after return):

I fixed it locally by explicitly casting to int in method getSize() in AbstractTrash.php. It now looks like this now:

public function getSize(): int {
return (int)$this->data->getSize();
}

I hope there will be another official fix, as this workaround seems to have problems with files larger than 4GB.

Hello i have the same problem also! i need to retrieve files out of the bin, i have currently upgraded to 19 but the logs states the below when i click on deleted files. Can anyone help please.

[remote] Error: TypeError: Argument 1 passed to OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin::logException() must be an instance of Exception, instance of TypeError given, called in /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php on line 89 at <>

  1. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin->logException(TypeError {})
  2. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->emit(“exception”, [TypeError {}])
  3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 319
    Sabre\DAV\Server->start()
  4. /var/www/nextcloud/apps/dav/lib/Server.php line 319
    Sabre\DAV\Server->exec()
  5. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  6. /var/www/nextcloud/remote.php line 167
    require_once("/var/www/nextcl … p")