Open supr4s opened 9 months ago
Something makes me think the final error in that stack trace may be a red herring, but to semi-rule that out you can try disabling rich workspaces globally to see if there is any change: occ config:app:set text workspace_available --value=0
(restart your app/FPM server for good measure after doing so).
Are there any other log entries from the point of trying to log-in and the provided stack trace?
It might be informative to lower your loglevel temporarily, to 1
and - if still nothing interesting - to 0
(DEBUG) briefly.
Hi @joshtrichards ,
Thanks for you quick feedback !
Well, it looks like you've found the problem.
One :
occ config:app:set text workspace_available --value=0
Fix the problem, everything working's again.
If i re-active rick workspace :
occ config:app:set text workspace_available --value=1
The problem returns.
FYI, here are the logs when log verbosity is set on 0
:
{"reqId":"AYLZKwmJTQSPx2pKrtAb","level":3,"time":"2024-01-10T08:38:48+00:00","remoteAddr":"x.x.x.x","user":"F146EBCF-9C26-42F9-A10D-D83394C1A610","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/F146EBCF-9C26-42F9-A10D-D83394C1A610/DONNEES/","message":"Exception thrown: OCP\\Files\\GenericFileException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0","version":"28.0.1.1","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"","Code":0,"Trace":[{"file":"/srv/nextcloud/www/apps/text/lib/DAV/WorkspacePlugin.php","line":119,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":95,"function":"OCA\\Text\\DAV\\{closure}","class":"OCA\\Text\\DAV\\WorkspacePlugin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/www/apps/text/lib/DAV/WorkspacePlugin.php","line":117,"function":"handle","class":"Sabre\\DAV\\PropFind","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"propFind","class":"OCA\\Text\\DAV\\WorkspacePlugin","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php","line":1052,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php","line":984,"function":"getPropertiesByNode","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php","line":1662,"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php","line":1647,"function":"writeMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":346,"function":"generateMultiStatus","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropFind","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/apps/dav/lib/Server.php","line":370,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},
{"file":"/srv/nextcloud/www/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/www/remote.php","line":172,"args":["/srv/nextcloud/www/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/srv/nextcloud/www/lib/private/Files/Node/File.php","Line":56,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\GenericFileException"}}
Can we consider this a bug with the latest server version (28.0.1)?
Thanks again for your help !
We have the same issue but without SMB shares. occ config:app:set text workspace_available --value=0
fixed it.
@svenseeberg Anything else similar to the original reporter's environment? LDAP auth perhaps?
Can we consider this a bug with the latest server version (28.0.1)?
Or the text
app (which admittedly is a standard app so the short answer would be "yes" :smile: ):
The bit of code here has been tweaked a few times for performance (though not recently). I think lines 116-128 more properly belong up under the if
at 107 but it'll require a closer look. I'm also hesitant to make the change blindly since this bit of code has been static for 2 years and was a little hairy to mess with then it looks like (nextcloud/text#2608), so there may be something else going on here triggering this suddenly now for you.
For example, I don't see any problem in a stock install (i.e. without LDAP).
I can confirm the issue - and the workaround mentioned in this comment above .
The weird thing is: we have ~10 Users all but one via LDAP. Only one had trouble accessing their files, others seemed fine.
Thank you for the quick workaround, and have a nice day :)
I had same issue
occ config:app:set text workspace_available --value=0
fixed it
@svenseeberg Anything else similar to the original reporter's environment? LDAP auth perhaps?
Sorry for the late answer. Yes, LDAP Auth.
The weird thing is: we have ~10 Users all but one via LDAP. Only one had trouble accessing their files, others seemed fine.
And this is also true in my case.
I have the same issue. From my experience, it occurs only for folders where a user doesn't have read permissions to all objects within.
I don't think this is in any way related to encryption or LDAP - I had the same issue for a WebDAV external storage, and the proposed workaround occ config:app:set text workspace_available --value=0
fixed the issue for me (though I'd really like to use the Text app in the Files listings).
To clarify: My instance does not use LDAP authentication, nor does it use sever-side encryption.
same problem here. as soon as I disable it it works.
Same problem here, NC 28.0.5, LDAP enabled.
{
"reqId": "wUyGLN68GLTPX9hjr4xA",
"level": 3,
"time": "2024-05-23T07:26:33+00:00",
"remoteAddr": "xxx",
"user": "xxx",
"app": "webdav",
"method": "PROPFIND",
"url": "/remote.php/dav/files/xxx/",
"message": "Exception thrown: OCP\\Files\\GenericFileException",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0",
"version": "28.0.5.1",
"exception": {
"Exception": "OCP\\Files\\GenericFileException",
"Message": "",
"Code": 0,
"Trace": [
{
"file": "/data/nextcloud_a1/apps/text/lib/DAV/WorkspacePlugin.php",
"line": 119,
"function": "getContent",
"class": "OC\\Files\\Node\\File",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/PropFind.php",
"line": 95,
"function": "OCA\\Text\\DAV\\{closure}",
"class": "OCA\\Text\\DAV\\WorkspacePlugin",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/data/nextcloud_a1/apps/text/lib/DAV/WorkspacePlugin.php",
"line": 117,
"function": "handle",
"class": "Sabre\\DAV\\PropFind",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "propFind",
"class": "OCA\\Text\\DAV\\WorkspacePlugin",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1052,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 984,
"function": "getPropertiesByNode",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1662,
"function": "getPropertiesIteratorForPath",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1647,
"function": "writeMultiStatus",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 346,
"function": "generateMultiStatus",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPropFind",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/apps/dav/lib/Server.php",
"line": 373,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->"
},
{
"file": "/data/nextcloud_a1/remote.php",
"line": 172,
"args": [
"/data/nextcloud_a1/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/data/nextcloud_a1/lib/private/Files/Node/File.php",
"Line": 56,
"message": "",
"exception": {},
"CustomMessage": "Exception thrown: OCP\\Files\\GenericFileException"
}
}
Had the same problem. No LDAP, but user files where on SMB share. Setting occ config:app:set text workspace_available --value=0
resolved
Same problem here. NC 29.0.3 and 29.0.4. Fixed with proposed fix here (although I used the GUI to just entirely disable the 'Text' app). Users authenticate via LDAP plugin. External storage is a local volume that is mounted over NFS outside of NC.
Same problem here. NC 29.0.4. "Fixed" with proposed fix. Only local user database and authentication, no ldap. External storage via SMB and SFTP. Problem only happens on the local storage, not on the external storages.
More info here: https://help.nextcloud.com/t/after-updating-to-29-0-4-users-have-lost-access-to-the-local-file-system/198810/6
It looks like a good idea to wrap $file->getContent()
in a try-catch-block: https://github.com/nextcloud/text/blob/c7bd53f796469fad9601b1c892eff15c9a394e33/lib/DAV/WorkspacePlugin.php#L119
The exceptions are documented in the file class.
The case, that the file content is unavailable for whatever reason, should not break the propfind request.
It could be related to https://github.com/nextcloud/server/pull/37943.
cc @come-nc @juliushaertl
Makes sense.
cc @elzody i think you had a similar report where we did not have logs when we talked about that.
The case, that the file content is unavailable for whatever reason, should not break the propfind request.
With "file content" are you refering to "external storage"?
If yes, I would like to point to an aspect, which might play a role here: In my installation, i have 3 external storages, all in the same subnet and connections are up. However, i run into this issue unless I turn off rich workspace. Now, while searching for the root case, i was looking into the database and in the oc_storages table i not only found these 3 configured external storages (with all its related records per user) which are also shown in the UI plus the records for the local storages, but a bunch of additional records pointing to external storages which have been deleted a long time ago and which do not show up in the UI.
Some thoughts regarding these (potential) findings:
Since i don't know the intention of the developers regarding the "external storages old db records deleteion process" i have not done a deeper investigation. In case the developers think this could be an issue, just ping me and I will support tracking this down as good as i can (if needed).
Just applied https://github.com/nextcloud/text/pull/6155, set occ config:app:set text workspace_available --value=1 and a short test confirms the problem i encountered is gone now (files are shown on local and external storages).
--
However, there still are tons of GenericFileExceptions in the logs (don't seem to come from the same code but at the same time seem to be related to the text app):
[index] Error: Exception thrown: OCP\Files\GenericFileException
PUT /index.php/apps/text/session/794422/create
--
Also, i found:
I don't know which behaviour is intended by the developers, but from a user point of view, this looks inconsistent and maybe indicates another issue.
On an available external storage/SFTP drive, the text area is displayed.
Isn't that just the content of the README.md file on your sftp storage? ;)
On the top directory of an available external storage/SMB drive, this warning is shown. Text/content seems to be missing.
Mind checking the xhr response in your browser's network tools? It should contain the error message and make it easier for us to figure out the problem.
On an available external storage/SFTP drive, the text area is displayed.
Isn't that just the content of the README.md file on your sftp storage? ;)
Yes, it is. So there it's working correctly. Just waned to document that the basic mechanism seems to work.
On the top directory of an available external storage/SMB drive, this warning is shown. Text/content seems to be missing.
Mind checking the xhr response in your browser's network tools? It should contain the error message and make it easier for us to figure out the problem.
Any specific property to identify the related xhr response (as there is quite a bunch of xhr messages i receive)? I checked all xhr messages and couldn't find any containing an error code/message, however, the jsons sometimes are bit hard to read so i could have missed it.
--
Refering to the issue i encounter on the SMB drive:
There is an empty readme.md on the related drive. It has been created by Nextcloud.
When i open the readme.md file in Nextcloud the same warning box is displayed.
When i open it in a text editor, it's just an empty file, nothing special about it.
Also i checked the user permissions which should be fine
On the http layer the only error i can see is a 500 Internal Server Error
as response to a PUT request:
https://nextcloud.domain.com/index.php/apps/text/session/794708/create
I opened readme.md in a file editor and added one line of text "This comment has been created opening the file in a text editor.",
When reloading the directory view on the SMB driver in Nextcloud, for the blink of an eye i can see the content from that file rendered to the text area and instantly getting replaced by this empty error message. Same behaviour when i open the readme.md - the content is shown in the editor/viewer for a short time and then the warning box is shown.
So, i deleted the readme.md on that smb share. Nextcloud now does not display that warning box again but also no text area is offered, so no readme.md could be created. . Also in the browser's network tab that PUT request "create" doesn't appear anymore.
--
I conclude the problem doesn't seem to be (direclty) related to the original defect/issue.
It somehow seems the basic functionality is working (as the content can be read and is displayed) but then some other mechanism kicks in leading displaying the warning box instead.
The problem i reported above i was able to track down to issues in the handling of file permission in the related php smb library. So it's not related to this tickets root cause.
⚠️ This issue respects the following points: ⚠️
Bug description
Hi everyone,
We have a whole group of LDAP users who connect to the Nextcloud with external storage (SMB/CIFS) that maps automatically as soon as the user logs on. Since upgrading to 28.0.1, some users are accessing network folders but nothing is visible (No files) and I'm getting generation errors at the same time :
So the network folder is accessible, but when it is accessed, everything remains empty and an error is generated.
I can't reproduce the problem for everyone, only for certain users. For example, user
A
will have access while userB
won't (even though on the Active Directory and Nextcloud sides they have exactly the same rights and permissions, they're practically identical profiles).I came across an issue that seems similar, as we also use Collabora :
https://help.nextcloud.com/t/ocp-files-genericfileexception-in-file-php-nach-occ-app-update-all/175085/2
Despite deactivating the richdocuments and richdocumentscode plugins, nothing to do still the same. I've also disabled preview and ACL checking in the external storage settings, but the problem persists. I also have the same problem if I create a share manually from the user account, in addition to the share done automatically at login.
I also tried to delete the LDAP user from Nextcloud but it was impossible ((Is it possible to force the deletion and then reconnect as if from scratch? That would be a good idea) :
I also deleted his Nextcloud user profile folder, then reconnected, but that didn't work.
The size of the folder is displayed, and you can access it (a sign that the link is working), but as soon as you access it, everything is empty.
Steps to reproduce
Expected behavior
The contents of the folder are displayed.
Installation method
None
Nextcloud Server version
28
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response