Can't access trashbin

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

I’ve seen that there are similar issues but they are on older versions

Nextcloud version: 18.0.4
Operating system and version: Debian GNU/Linux 10 (buster)
Apache or nginx version: Apache/2.4.38
PHP version: 7.3.14

The issue you are facing: I cannot open the trashbin

Is this the first time you’ve seen this error?: Y

Steps to replicate it:

  1. Try to open the trashbin
  2. Enjoy the error

The output of your Nextcloud log in Admin > Logging:

    Error	remote	TypeError: Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type int, float returned

    /var/www/nextcloud/apps/files_trashbin/lib/Sabre/PropfindPlugin.php - line 86:

    OCA\Files_Trashbin\Sabre\AbstractTrash->getSize()

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php - line 98:

    OCA\Files_Trashbin\Sabre\PropfindPlugin->OCA\Files_Trashbin\Sabre\{closure}("*** sensiti ... *")

    /var/www/nextcloud/apps/files_trashbin/lib/Sabre/PropfindPlugin.php - line 87:

    Sabre\DAV\PropFind->handle("{http://owncloud.org/ns}size", Closure {})

    <<closure>>

    OCA\Files_Trashbin\Sabre\PropfindPlugin->propFind(Sabre\DAV\PropFind {}, OCA\Files_Tr ... {})

    /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:

    call_user_func_array([ OCA\Files_ ... "], [ Sabre\DAV\ ... }])

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1059:

    Sabre\Event\EventEmitter->emit("propFind", [ Sabre\DAV\ ... }])

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 981:

    Sabre\DAV\Server->getPropertiesByNode(Sabre\DAV\PropFind {}, OCA\Files_Tr ... {})

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1666:

    Sabre\DAV\Server->getPropertiesIteratorForPath("trashbin/eric.solinas/trash", [ "{http://n ... "], 1)

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 355:

    Sabre\DAV\Server->generateMultiStatus(Generator {}, false)

    <<closure>>

    Sabre\DAV\CorePlugin->httpPropFind(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

    /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:

    call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:

    Sabre\Event\EventEmitter->emit("method:PROPFIND", [ Sabre\HTTP ... }])

    /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:

    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

    /var/www/nextcloud/apps/dav/lib/Server.php - line 319:

    Sabre\DAV\Server->exec()

    /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:

    OCA\DAV\Server->exec()

    /var/www/nextcloud/remote.php - line 165:

    require_once("/var/www/ne ... p")

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'INSTANCE_ID',
  'passwordsalt' => 'PASSWORD_SALT',
  'secret' => 'SECRET',
  'trusted_domains' =>
  array (
    0 => 'URL',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'overwrite.cli.url' =>
  array (
    0 => 'URL/nextcloud',
  ),
  'dbname' => 'DB_NAME',
  'dbhost' => 'DB_HOST',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'USER',
  'dbpassword' => 'PSW',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'app_install_overwrite' =>
  array (
    0 => 'keeporsweep',
    1 => 'bookmarks_fulltextsearch',
    2 => 'dashboard',
    3 => 'caniupdate',
    4 => 'files_clipboard',
  ),
  'has_rebuilt_cache' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'default_language' => 'en',
  'force_language' => 'en',
  'default_locale' => 'en_IE',
  'force_locale' => 'en_IE',
  'maintenance' => false,
  'mail_smtpsecure' => 'tls',
  'mail_from_address' => 'EMAIL',
  'mail_domain' => 'gmail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'USER',
  'mail_smtppassword' => 'PSW',
);

The output of your Apache/nginx/system log in /var/log/____:
nextcloud_error_log

[Thu May 21 14:19:31.349131 2020] [access_compat:error] [pid 12643] [client 79.51.181.91:51638] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Thu May 21 15:15:46.108467 2020] [access_compat:error] [pid 12857] [client 79.51.181.91:50784] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Thu May 21 21:40:45.857405 2020] [access_compat:error] [pid 12857] [client 79.51.181.91:49996] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Fri May 22 12:55:02.856938 2020] [access_compat:error] [pid 23187] [client 79.51.181.91:50857] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Fri May 22 13:16:24.136168 2020] [access_compat:error] [pid 23187] [client 79.51.181.91:50451] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Fri May 22 13:16:53.819081 2020] [access_compat:error] [pid 23186] [client 79.51.181.91:50453] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Fri May 22 13:17:25.961204 2020] [access_compat:error] [pid 22955] [client 79.51.181.91:50459] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Fri May 22 13:17:26.684968 2020] [access_compat:error] [pid 22953] [client 79.51.181.91:50461] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Fri May 22 15:30:13.212043 2020] [access_compat:error] [pid 22955] [client 79.51.181.91:58244] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Sat May 23 07:11:30.315322 2020] [access_compat:error] [pid 17875] [client 79.51.181.91:53830] AH01797: client denied by server configuration: /var/www/nextcloud/config
[Sat May 23 07:22:08.224318 2020] [access_compat:error] [pid 17573] [client 79.51.181.91:51853] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Sat May 23 07:32:29.254878 2020] [access_compat:error] [pid 22026] [client 79.51.181.91:52138] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata

Same problem here. Collected a lot of trash over the years and wanted to get finally rid of the volume.
Solution:

sudo -u www-data php occ trashbin:cleanup --all-users

Of course, it does, what it says, so you’ll loose every data in trash irreversible - but that was the goal in my case.

Everything works fine after that, including access trash.

1 Like

I see, but I really need to access the trashbin :frowning:

Thanks

You could manualy save the trash content from the filesystem and then use the command mentioned above.

1 Like

Yeah, but that’s not the solution to the problem, I hope some developer will see this and investigate the issue

I appreciate the suggestions of workarounds though, really!

There is a longstanding bug for this registered at github, but I fear it only offers the same solution as posted above already:

So, TL;DR: issue is known , if you really need to access your files, do as @BruderB suggested: copy them manually and then clear the trashbin.

1 Like