Nextcloud : impossible d'accéder à la corbeille

Bonjour
J’ai Nextcloud version 22.2.7 (la dernière disponible à cette heure). Tout fonctionnait correctement jusqu’à présent.
Après avoir hébergé un fichier sur la brique, et l’avoir supprimé, je n’arrive plus à accéder à la corbeille.
J’ai ce message quand je clique dessus :
“Ce répertoire est indisponible, merci de consulter les journaux ou de contacter votre administrateur”.

J’ai bien accès à tout en dehors de ça, je peux voir et accéder au contenu de la corbeille en question en me connectant directement.
La seule manip que j’ai tentée pour le moment est de redémarrer le service “mysql”, mais ça n’a rien donné.

Si vous avez des suggestions je suis prenneur !

Il faut commencer par “consulter les journaux”.

tail -f /home/yunohost.app/nextcloud/data/nextcloud.log

En parallèle, tu vas sur la page corbeille, l’erreur qui se rajoute (au format json) sera la bonne. Après quoi il faut regarder attentivement dans ce json pour trouver le message d’erreur (juste après "message": logiquement)

Cette erreur te donnera une indication sur ton soucis. Des fois c’est explicite et des fois moins, une recherche nextcloud + MESSAGE D'ERREUR peut permettre d’y voir plus clair. Tu peux aussi copier ce message ici.

Merci beaucoup pour ta réponse !

Voilà ce que j’ai obtenu :

# tail -f /home/yunohost.app/nextcloud/data/nextcloud.log
{"reqId":"EdAyxlCefwDBgHiQZPCi","level":2,"time":"2022-07-13T10:40:57+00:00","remoteAddr":"86.209.29.64","user":"--","app":"user_ldap","method":"PROPFIND","url":"/nextcloud/remote.php/dav/files/vafnir//","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.20.3","version":"22.2.7.1"}
{"reqId":"EdAyxlCefwDBgHiQZPCi","level":2,"time":"2022-07-13T10:40:57+00:00","remoteAddr":"86.209.29.64","user":"--","app":"user_ldap","method":"PROPFIND","url":"/nextcloud/remote.php/dav/files/vafnir//","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.20.3","version":"22.2.7.1"}
{"reqId":"EdAyxlCefwDBgHiQZPCi","level":2,"time":"2022-07-13T10:40:58+00:00","remoteAddr":"86.209.29.64","user":"--","app":"core","method":"PROPFIND","url":"/nextcloud/remote.php/dav/files/vafnir//","message":"Login failed: 'Vafnir' (Remote IP: '86.209.29.64')","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.20.3","version":"22.2.7.1"}
{"reqId":"rQW8gOzxEixFmiaUePaM","level":2,"time":"2022-07-13T10:41:25+00:00","remoteAddr":"86.209.29.64","user":"--","app":"user_ldap","method":"PROPFIND","url":"/nextcloud/remote.php/dav/files/vafnir//Documents/","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.20.3","version":"22.2.7.1"}
{"reqId":"rQW8gOzxEixFmiaUePaM","level":2,"time":"2022-07-13T10:41:26+00:00","remoteAddr":"86.209.29.64","user":"--","app":"user_ldap","method":"PROPFIND","url":"/nextcloud/remote.php/dav/files/vafnir//Documents/","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.20.3","version":"22.2.7.1"}
{"reqId":"rQW8gOzxEixFmiaUePaM","level":2,"time":"2022-07-13T10:41:26+00:00","remoteAddr":"86.209.29.64","user":"--","app":"core","method":"PROPFIND","url":"/nextcloud/remote.php/dav/files/vafnir//Documents/","message":"Login failed: 'Vafnir' (Remote IP: '86.209.29.64')","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.20.3","version":"22.2.7.1"}
{"reqId":"wbrAWhDeWPj9HkPjO9tv","level":4,"time":"2022-07-13T10:43:43+00:00","remoteAddr":"2a01:cb04:bc:8400:65a8:a416:a61:2d91","user":"smidge","app":"webdav","method":"PROPFIND","url":"/nextcloud/remote.php/dav/trashbin/smidge/trash","message":"Return value of OCA\\Files_Trashbin\\Sabre\\AbstractTrash::getSize() must be of the type int, float returned","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0","version":"22.2.7.1","exception":{"Exception":"TypeError","Message":"Return value of OCA\\Files_Trashbin\\Sabre\\AbstractTrash::getSize() must be of the type int, float returned","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Sabre/PropfindPlugin.php","line":84,"function":"getSize","class":"OCA\\Files_Trashbin\\Sabre\\AbstractTrash","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":95,"function":"OCA\\Files_Trashbin\\Sabre\\{closure}","class":"OCA\\Files_Trashbin\\Sabre\\PropfindPlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Sabre/PropfindPlugin.php","line":85,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->","args":["{http://owncloud.org/ns}size",{"__class__":"Closure"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"OCA\\Files_Trashbin\\Sabre\\PropfindPlugin","type":"->","args":[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\Files_Trashbin\\Sabre\\TrashFolder"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["propFind",[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\Files_Trashbin\\Sabre\\TrashFolder"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\DAV\\PropFind"},{"__class__":"OCA\\Files_Trashbin\\Sabre\\TrashFolder"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1661,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["trashbin/smidge/trash",["{http://nextcloud.org/ns}trashbin-filename","{http://nextcloud.org/ns}trashbin-deletion-time","{http://nextcloud.org/ns}trashbin-original-location","{http://nextcloud.org/ns}trashbin-title","{DAV:}getlastmodified","And 12 more entries, set log level to debug to see all entries"],1]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1646,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"elementMap":[],"contextUri":"/nextcloud/remote.php/dav/","namespaceMap":{"DAV:":"d","http://sabredav.org/ns":"s","http://owncloud.org/ns":"oc","http://nextcloud.org/ns":"nc"},"classMap":[],"__class__":"Sabre\\Xml\\Writer"},{"__class__":"Generator"},false]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Generator"},false]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPFIND",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":333,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/remote.php","line":166,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/files_trashbin/lib/Sabre/AbstractTrash.php","Line":61,"CustomMessage":"--"}}

Et pour l’erreur sur la page, il me donne ça :

XHRPROPFINDhttps://smidge.noho.st/nextcloud/remote.php/dav/trashbin/smidge/trash
[HTTP/2 500 Internal Server Error 767ms]

Et quand je vais fouiller dans les détails avec firefox :

“En-têtes de la réponse :”

XHRPROPFINDhttps://smidge.noho.st/nextcloud/remote.php/dav/trashbin/smidge/trash
[HTTP/2 500 Internal Server Error 767ms]

	
PROPFIND
	https://smidge.noho.st/nextcloud/remote.php/dav/trashbin/smidge/trash
État500
Internal Server Error
VersionHTTP/2
Transfert1,29 Ko (taille 278 o)
Politique de référentno-referrer

    	
    HTTP/2 500 Internal Server Error

    server: nginx

    date: Wed, 13 Jul 2022 10:43:43 GMT

    content-type: application/xml; charset=utf-8

    x-sso-wat: You've just been SSOed

    expires: Thu, 19 Nov 1981 08:52:00 GMT

    cache-control: no-store, no-cache, must-revalidate

    pragma: no-cache

    content-security-policy: upgrade-insecure-requests

    vary: Brief,Prefer

    dav: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, nc-calendar-search, nc-enable-birthday-calendar

    content-security-policy-report-only: default-src https: data: blob: ; object-src https: data: 'unsafe-inline'; style-src https: data: 'unsafe-inline' ; script-src https: data: 'unsafe-inline' 'unsafe-eval'

    x-content-type-options: nosniff

    x-xss-protection: 1; mode=block

    x-download-options: noopen

    x-permitted-cross-domain-policies: none

    x-frame-options: SAMEORIGIN

    permissions-policy: interest-cohort=()

    strict-transport-security: max-age=15768000; includeSubDomains; preload;

    referrer-policy: no-referrer

    x-robots-tag: none

    X-Firefox-Spdy: h2
    	
    PROPFIND /nextcloud/remote.php/dav/trashbin/smidge/trash HTTP/2

    Host: smidge.noho.st

    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

    Accept: */*

    Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3

    Accept-Encoding: gzip, deflate, br

    X-Requested-With: XMLHttpRequest

    requesttoken: HlHcQL1IgcQDrYoPdjw0KKaBr0WVdGyEVTNu0wZgUJ4=:bzuWeeggyq8x1ONJDgVCQeng5jbUGVrwFFAHpEo1Maw=

    Depth: 1

    Content-Type: application/xml; charset=utf-8

    Content-Length: 644

    Origin: https://smidge.noho.st

    Connection: keep-alive

    Cookie: nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; nc_username=smidge; nc_token=7g90SVlcfVKYoPC7ueEaeGW%2FCHX0v14T; nc_session_id=bkeullbmu8cn5ckebo8t2e0ssv; oc_sessionPassphrase=VH%2FJGoc3z6TEuS5Cu2LYJ9vRVb9z62z8HfVD9y1%2Bt%2BN9KH1r%2FQ8NOhNEDg8nHILtucqMzSWkq4fZmXKcvZ5zGfHKJIuLIodox%2B5pIaWKtDDxq%2B5LmRGCGt9FSpn9hpCn; ocjzuz75e5xi=bkeullbmu8cn5ckebo8t2e0ssv; SSOwAuthUser=smidge; SSOwAuthHash=c31b7917a7f9e96eadd4b4dabb5a1dcc0bbd6d923d546bf1ed8fccf8da7acb361f67a3b53beb33e887e15baa2c34ffc4b00052323927e5a92e9a5bc731281611; SSOwAuthExpire=1658238119.372

    Sec-Fetch-Dest: empty

    Sec-Fetch-Mode: cors

    Sec-Fetch-Site: same-origin

    TE: trailers

"En-têtes de la requête : "

XHRPROPFINDhttps://smidge.noho.st/nextcloud/remote.php/dav/trashbin/smidge/trash
[HTTP/2 500 Internal Server Error 767ms]

	
PROPFIND
	https://smidge.noho.st/nextcloud/remote.php/dav/trashbin/smidge/trash
État500
Internal Server Error
VersionHTTP/2
Transfert1,29 Ko (taille 278 o)
Politique de référentno-referrer

    	
    HTTP/2 500 Internal Server Error

    server: nginx

    date: Wed, 13 Jul 2022 10:43:43 GMT

    content-type: application/xml; charset=utf-8

    x-sso-wat: You've just been SSOed

    expires: Thu, 19 Nov 1981 08:52:00 GMT

    cache-control: no-store, no-cache, must-revalidate

    pragma: no-cache

    content-security-policy: upgrade-insecure-requests

    vary: Brief,Prefer

    dav: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, nc-calendar-search, nc-enable-birthday-calendar

    content-security-policy-report-only: default-src https: data: blob: ; object-src https: data: 'unsafe-inline'; style-src https: data: 'unsafe-inline' ; script-src https: data: 'unsafe-inline' 'unsafe-eval'

    x-content-type-options: nosniff

    x-xss-protection: 1; mode=block

    x-download-options: noopen

    x-permitted-cross-domain-policies: none

    x-frame-options: SAMEORIGIN

    permissions-policy: interest-cohort=()

    strict-transport-security: max-age=15768000; includeSubDomains; preload;

    referrer-policy: no-referrer

    x-robots-tag: none

    X-Firefox-Spdy: h2
    	
    PROPFIND /nextcloud/remote.php/dav/trashbin/smidge/trash HTTP/2

    Host: smidge.noho.st

    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

    Accept: */*

    Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3

    Accept-Encoding: gzip, deflate, br

    X-Requested-With: XMLHttpRequest

    requesttoken: HlHcQL1IgcQDrYoPdjw0KKaBr0WVdGyEVTNu0wZgUJ4=:bzuWeeggyq8x1ONJDgVCQeng5jbUGVrwFFAHpEo1Maw=

    Depth: 1

    Content-Type: application/xml; charset=utf-8

    Content-Length: 644

    Origin: https://smidge.noho.st

    Connection: keep-alive

    Cookie: nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; nc_username=smidge; nc_token=7g90SVlcfVKYoPC7ueEaeGW%2FCHX0v14T; nc_session_id=bkeullbmu8cn5ckebo8t2e0ssv; oc_sessionPassphrase=VH%2FJGoc3z6TEuS5Cu2LYJ9vRVb9z62z8HfVD9y1%2Bt%2BN9KH1r%2FQ8NOhNEDg8nHILtucqMzSWkq4fZmXKcvZ5zGfHKJIuLIodox%2B5pIaWKtDDxq%2B5LmRGCGt9FSpn9hpCn; ocjzuz75e5xi=bkeullbmu8cn5ckebo8t2e0ssv; SSOwAuthUser=smidge; SSOwAuthHash=c31b7917a7f9e96eadd4b4dabb5a1dcc0bbd6d923d546bf1ed8fccf8da7acb361f67a3b53beb33e887e15baa2c34ffc4b00052323927e5a92e9a5bc731281611; SSOwAuthExpire=1658238119.372

    Sec-Fetch-Dest: empty

    Sec-Fetch-Mode: cors

    Sec-Fetch-Site: same-origin

    TE: trailers

En espérant que ça puisse être utile…

Donc l’erreur c’est

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

Une recherche avec l’erreur dans startpage donne en premier lien ce sujet: Trash bin: AbstractTrash::getSize() must be of the type integer, float returned · Issue #13160 · nextcloud/server · GitHub

Je cite ici 2 solutions:

  • Editer le fichier AbstractTrash.php

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();
}

It works for me too, thanks!

  • OU utiliser fsck (le problème serait dû à des fichiers corrompues

I unmounted the partition and let sudo fsck -v run through it. After that I made a filescan with sudo /snap/bin/nextcloud.occ files:scan --all and after that, the trashbin works fine without editing the AbstractTrash.php.

la première solution a fonctionné !!!

merci !!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.