Repository navigation
Description
Steps to reproduce
- open trashbin
Expected behaviour
Trashbin should load.
Actual behaviour
Trashbin doesn't load, 500 returned to PROPFIND request.
Server configuration
Operating system: Centos 7.6
Web server: Apache/2.4.6
Database: mysql Ver 15.1 Distrib 5.5.60-MariaDB,
PHP version: PHP 7.3.0
Nextcloud version: 15.0.0
Updated from an older Nextcloud/ownCloud or fresh install: updated from 14 (and 15 beta/rc)
Where did you install Nextcloud from: zip file
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
- accessibility: 1.1.0
- activity: 2.8.2
- bookmarks: 0.15.1
- calendar: 1.6.4
- cloud_federation_api: 0.1.0
- comments: 1.5.0
- contacts: 3.0.1
- dav: 1.8.0
- deck: 0.5.2
- encryption: 2.3.0
- federatedfilesharing: 1.5.0
- federation: 1.5.0
- files: 1.10.0
- files_external: 1.6.0
- files_pdfviewer: 1.4.0
- files_sharing: 1.7.0
- files_texteditor: 2.7.0
- files_trashbin: 1.5.0
- files_versions: 1.8.0
- files_videoplayer: 1.4.0
- gallery: 18.2.0
- logreader: 2.0.0
- lookup_server_connector: 1.3.0
- mail: 0.11.0
- news: 13.0.3
- nextcloud_announcements: 1.4.0
- notifications: 2.3.0
- oauth2: 1.3.0
- password_policy: 1.5.0
- previewgenerator: 2.0.0
- provisioning_api: 1.5.0
- serverinfo: 1.5.0
- sharebymail: 1.5.0
- spreed: 5.0.0
- support: 1.0.0
- survey_client: 1.3.0
- systemtags: 1.5.0
- theming: 1.6.0
- twofactor_backupcodes: 1.4.1
- twofactor_totp: 2.1.0
- updatenotification: 1.5.0
- workflowengine: 1.5.0
Disabled:
- admin_audit
- bookmarks.bak
- caniupdate
- drawio
- end_to_end_encryption
- files_downloadactivity
- firstrunwizard
- user_external
- user_ldap
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
""
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "15.0.0.10",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"theme": "",
"maintenance": false,
"maxZipInputSize": 0,
"allowZipDownload": true,
"secret": "***REMOVED SENSITIVE VALUE***",
"app.mail.server-side-cache.enabled": true,
"trashbin_retention_obligation": "auto",
"preview_max_scale_factor": 1,
"memcache.local": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"htaccess.RewriteBase": "\/",
"overwrite.cli.url": "",
"updater.release.channel": "stable",
"mysql.utf8mb4": true,
"mail_smtpmode": "sendmail",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"loglevel": 2
}
}
Are you using external storage, if yes which one: No
Are you using encryption: No.
Nextcloud log (data/nextcloud.log)
Nextcloud log
{
"reqId": "XDTLVTxaidDFwsfofQbtZgAAAAo",
"level": 3,
"time": "2019-01-08T16:09:58+00:00",
"remoteAddr": "",
"user": "ledfan",
"app": "remote",
"method": "PROPFIND",
"url": "/remote.php/dav/trashbin/ledfan/trash",
"message": {
"Exception": "TypeError",
"Message": "Argument 2 passed to OCA\\Files_Trashbin\\Trash\\TrashItem::__construct() must be of the type string, null given, called in /srv/host.be/www/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php on line 57",
"Code": 0,
"Trace": [
{
"file": "/srv/host.be/www/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php",
"line": 57,
"function": "__construct",
"class": "OCA\\Files_Trashbin\\Trash\\TrashItem",
"type": "->",
"args": [
"*** sensitive parameter replaced ***",
null,
1532667637,
"/Applications-laptop.d1532667637",
"*** sensitive parameter replaced ***",
{
"__class__": "OC\\User\\User"
}
]
},
{
"function": "OCA\\Files_Trashbin\\Trash\\{closure}",
"class": "OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/srv/host.be/www/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php",
"line": 55,
"function": "array_map",
"args": [
{
"__class__": "Closure"
},
[
{
"__class__": "OC\\Files\\FileInfo___ a lot of these!"
}
]
]
},
{
"file": "/srv/host.be/www/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php",
"line": 69,
"function": "mapTrashItems",
"class": "OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend",
"type": "->",
"args": [
{
"__class__": "OC\\Files\\FileInfo___ a lot of these!"
}
]
},
{
"file": "/srv/host.be/www/apps/files_trashbin/lib/Trash/TrashManager.php",
"line": 48,
"function": "listTrashRoot",
"class": "OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend",
"type": "->",
"args": [
{
"__class__": "OC\\User\\User"
}
]
},
{
"function": "OCA\\Files_Trashbin\\Trash\\{closure}",
"class": "OCA\\Files_Trashbin\\Trash\\TrashManager",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/srv/host.be/www/apps/files_trashbin/lib/Trash/TrashManager.php",
"line": 49,
"function": "array_reduce",
"args": [
{
"OCP\\Files\\Storage\\IStorage": "*** sensitive parameter replaced ***"
},
{
"__class__": "Closure"
},
"*** sensitive parameter replaced ***"
]
},
{
"file": "/srv/host.be/www/apps/files_trashbin/lib/Sabre/TrashRoot.php",
"line": 68,
"function": "listTrashRoot",
"class": "OCA\\Files_Trashbin\\Trash\\TrashManager",
"type": "->",
"args": [
{
"__class__": "OC\\User\\User"
}
]
},
{
"file": "/srv/host.be/www/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 195,
"function": "getChildren",
"class": "OCA\\Files_Trashbin\\Sabre\\TrashRoot",
"type": "->",
"args": []
},
{
"file": "/srv/host.be/www/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 899,
"function": "getChildren",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"trashbin/ledfan/trash"
]
},
{
"file": "/srv/host.be/www/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 978,
"function": "generatePathNodes",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Sabre\\DAV\\PropFind"
},
[
{
"__class__": "Sabre\\DAV\\PropFind"
},
{
"__class__": "OCA\\Files_Trashbin\\Sabre\\TrashRoot"
}
]
]
},
{
"file": "/srv/host.be/www/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1666,
"function": "getPropertiesIteratorForPath",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"trashbin/ledfan/trash",
[
"{http://nextcloud.org/ns}trashbin-filename",
"{http://nextcloud.org/ns}trashbin-deletion-time",
"{DAV:}getlastmodified",
"{DAV:}getetag",
"{DAV:}getcontenttype",
"{DAV:}resourcetype",
"{http://owncloud.org/ns}fileid",
"{http://owncloud.org/ns}permissions",
"{http://owncloud.org/ns}size",
"{DAV:}getcontentlength",
"{http://nextcloud.org/ns}has-preview",
"{http://nextcloud.org/ns}mount-type",
"{http://nextcloud.org/ns}is-encrypted",
"{http://open-collaboration-services.org/ns}share-permissions",
"{http://owncloud.org/ns}comments-unread"
],
1
]
},
{
"file": "/srv/host.be/www/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 355,
"function": "generateMultiStatus",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Generator"
},
false
]
},
{
"function": "httpPropFind",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"absoluteUrl": "https://host.be/remote.php/dav/trashbin/ledfan/trash",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/srv/host.be/www/3rdparty/sabre/event/lib/EventEmitterTrait.php",
"line": 105,
"function": "call_user_func_array",
"args": [
[
{
"__class__": "Sabre\\DAV\\CorePlugin"
},
"httpPropFind"
],
[
{
"absoluteUrl": "https://host.be/remote.php/dav/trashbin/ledfan/trash",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/srv/host.be/www/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 479,
"function": "emit",
"class": "Sabre\\Event\\EventEmitter",
"type": "->",
"args": [
"method:PROPFIND",
[
{
"absoluteUrl": "https://host.be/remote.php/dav/trashbin/ledfan/trash",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/srv/host.be/www/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 254,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"absoluteUrl": "https://host.be/remote.php/dav/trashbin/ledfan/trash",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/srv/host.be/www/apps/dav/lib/Server.php",
"line": 301,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/srv/host.be/www/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/srv/host.be/www/remote.php",
"line": 163,
"args": [
"/srv/host.be/www/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/srv/host.be/www/apps/files_trashbin/lib/Trash/TrashItem.php",
"Line": 41,
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0",
"version": "15.0.1.0",
"id": "5c34cb656b6b4"
}
I tried to run a occ files:scan and clean command, but that didn't help. I never had the issue in 14, but now having it in 15 (upgraded since the beta, but never loaded the trahsbin...)
I guess cc @icewind1991 because you refactored the trashbin code 😃
Activity
[-]Tashbin doesn't load[/-][+]Trashbin doesn't load[/+]felix-berlin commentedon Jan 14, 2019
Same problem here. I use v15.02
ja573 commentedon Jan 16, 2019
Same problem on v15.0.2 over docker, using nginx and nextcloud:fpm
ja573 commentedon Jan 16, 2019
The actual error I get is:
paskalito commentedon Jan 22, 2019
https://help.nextcloud.com/t/cant-access-to-the-trashbin/45844
paskalito commentedon Jan 23, 2019
i have the same problem my log goes as
also additionaly an account where there are no deleted files successfully loads the page saying that there are no deleted files.
and also when i create one textfile and then deletes it works. - i can see and recover it in deleted files.
mateusfmello commentedon Jan 24, 2019
I have the same problem
CentOS 7.6
Apache 2.4.6
PHP 7.2
PostgreSQL 9.6.11
Nextcloud 15.0.2.0
paskalito commentedon Jan 25, 2019
@icewind1991 Do you have any thoughts on this?
@ALL i am in the situation that loads of data got deleted that need to be recovered as soon as possible, and at least preferably before they get deleted in the trashbin. that should happen in about 10 days.
I have a filesystem backup of the data, so it should not get lost entirely, but its like 30GB, and its on the other side of the world with not so fast internet connection. do you have any recemendation, how i could add the data to server again directly?
maybe add it again to the filestructure and then run the occ:filesscan command from above?
koehn commentedon Jan 26, 2019
FWIW I had this same problem and ran
occ trashbin:cleanup [userid]and afterwards I could view my (now empty) deleted items folder.paskalito commentedon Jan 28, 2019
i went for restoring the data from my backup and doing a file scan which luckily seems to work.
frederikmoellers commentedon Jan 29, 2019
Edit: Don't follow this workaround, there is a PR with a proper fix. See the next comment for details.
As a workaround, try this:
Open file
apps/files_trashbin/lib/Trash/LegacyTrashBackend.phpwith an editor. Go to line 58. It should be something likeThen, replace this line by the following:
Don't read the rest if you just want a quick fix.
I tried to understand the code (which is hard because there are virtually no comments describíng what exactly is happening within a function), but failed. I thought that this would restore files which were in the root of the trash bin to the root directory. However, I just tested it with a file that was removed individually (i.e. the directory was not removed as a whole, so the file ended up in the root of the trash bin) and it ended back in the directory it was originally in. So in the end I'm pretty sure that this workaround is not correct wrt. how the function should work, but so far I just don't see what exactly is wrong about it.
Unless someone from the team jumps in to provide some help/guidance I probably won't research this further and won't submit a PR, simply because I still think this is not a correct/good fix and I don't have the time to work my head around the code to make a good one :(
kesselb commentedon Jan 29, 2019
#13886 might work for you? 🤔
frederikmoellers commentedon Jan 30, 2019
Indeed, thanks for the pointer! I updated my comment to not mislead anyone coming here.
This issue is also a duplicate of #13005, if anybody wants to mark it as such and close it.
kesselb commentedon Jan 30, 2019
Closed by #13886. Fix will be part of 15.0.3.
rpellerin commentedon Mar 4, 2019
@kesselb I am running 15.0.5 and the problem is still there. Wasn't it released?
Here is some extract of the logs:
alexandernst commentedon Mar 14, 2019
I too get this problem and I'm on 15.0.5
I'm using S3 as my primary storage.
paskalito commentedon Mar 17, 2019
Same for me - nohing changed with the update
@kesselb do you wanna reopen this issue or do we need to open a new one?
kesselb commentedon Mar 17, 2019
If you see
AbstractTrash::getSize() must be of the type integer, float returnedin your logs than #13160 is the right issue for you.kesselb commentedon Mar 17, 2019
@alexandernst looks like an issue with the groupfolders. Could you report this issue to https://github.com/nextcloud/groupfolders/issues?
bcutter commentedon Mar 17, 2019
Same for me, fix doesn´t work cause it´s already applied in AbstractTrash.php.
Running on a Raspberry Pi with NC v15.0.5.3, deleted files totally at least 8 to 9 GB. No way to recover... horrible, I´m lost :-(