[Bug]: PHP unlink error, no such file: `unlink(/var/www/nextcloud/data/appdata_[...]/richdocuments/remoteData/capabilities`
jameskimmel opened this issue · 14 comments
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
the system logs PHP errors like these:
[PHP] Error: unlink(/var/www/nextcloud/data/appdata_ocgfs89mpg4c/richdocuments/remoteData/capabilities): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#348
GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json
Steps to reproduce
Not clear. But all affected users seem to use Collabora Online - Built-in CODE Server
Expected behavior
No errors under the logging page.
Installation method
Community Manual installation with Archive
Nextcloud Server version
28
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 28 to 29)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Nextcloud Logs
{"reqId":"O736PgfFCb34EnaHt59Q","level":3,"time":"2024-08-13T16:50:10+00:00","remoteAddr":"redact","user":"user","app":"PHP","method":"GET","url":"/index.phps/api/v1/stats","message":"unlink(/mnt/nextcloud/data/appdata_ocyao8xfftvv/richdocuments/remoteData/discovery): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#348","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0","version":"29.0.4.1","data":{"app":"PHP"},"id":"66bcace1b6880"}
Confirm this issue since update from v29.0.3 to v29.0.4
Running Ubuntu 22.04, PHP 8.1 and PostgreSQL.
(No docker or snap)
The Nextcloud snap team tests and documents recommended default apps. Our documentation for CODE & Nextcloud Office configuration is also part of the default fresh install snap testing. These tests are largely automated.
This issue has not appeared on fresh install tests, but does occur upon upgrading from 29.0.3 to 29.0.4. Thus I'm confirming this issue in Nextcloud snap 29.0.4snap2 on my personal productive instance.
[PHP] Fehler: unlink(/media/data/appdata_ocebz5f5f1qq/richdocuments/remoteData/capabilities): No such file or directory at /snap/nextcloud/43538/htdocs/lib/private/Files/Storage/Local.php#348 ....
GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json
Been seeing various reports of this, on the community forum, for the past month or two as well:
https://help.nextcloud.com/search?q=Unlink%20richdocuments%20order%3Alikes
Nextcloud version (eg, 29.0.5): 29.0.4
Operating system and version (eg, Ubuntu 24.04): Pop_OS 22.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 8.3): 8.3.9
The issue you are facing:
[PHP] Error: unlink(/var/www/nextcloud/data/appdata_ocgfs89mpg4c/richdocuments/remoteData/capabilities): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#348
GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json
I’m getting multiple entries in logs for this error since version nc28.
Entries show IP of 2 different computers.
/var/www/nextcloud/data/appdata_ocgfs89mpg4c/richdocuments/remoteData/capabilities
and
/var/www/nextcloud/lib/private/Files/Storage/Local.php
do exist and appear to be valid.
I’ve tried clearing browser cache on both computers that get the error.
I’ve run the following at various times to try to find/fix the error:
occ maintenance:repair
occ files:cleanup
occ files:repair-tree
occ files:scan jim
occ files:scan-app-data
occ check
occ setupchecks
Is this the first time you’ve seen this error? (Y/N): N
Steps to replicate it:
check logs
The output of your Nextcloud log in Admin > Logging:
[PHP] Error: unlink(/var/www/nextcloud/data/appdata_ocgfs89mpg4c/richdocuments/remoteData/capabilities): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#348
GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json
The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):
The trace seems to come from the built-in CODE server autoconfiguration which I could imagine causing some concurrency issues then on 29. With 30 this should no longer be a problem as per #3762 but haven't looked into in depth on how this could happen and be prevented on 29 yet.
The trace seems to come from the built-in CODE server autoconfiguration which I could imagine causing some concurrency issues
thanks for the heads up... looking forward to 30 and will keep an eye on this when testing the snap.
had to revise my original comment since the logs began getting errors again... the issue has no effect on functionality though.
if you need that bash-script again, don't hesitate to request... 🥽👌
Seing the same issue after updating NC to 29.0.7 (NCPi here)
Can you paste the full log error as json here?
@juliushaertl this issue is resolved in the snap: nextcloud-snap/nextcloud-snap#2901
This fixed the errors for me as well as it looks. Probably also some issues the mail app had as well.
However, on NCP it goes like this:
sudo redis-cli -a <passwordfromconfig.php> flushdb
Hmm... eventually it came back...
[PHP] Fehler: unlink(/media/myCloudDrive/ncdata/appdata_oc1lgek82p77/richdocuments/remoteData/capabilities): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#348
PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json
von von um 17.10.2024, 03:09:48
I expect this to be some kind of concurrency issue when refreshing the metadata from the collabora server, but haven't been able to reproduce this. It should not have any impact on the usage.
Everyone encountering this, can you please paste the raw log file content of that error message? That could help to narrow down why this is triggered.
It should not have any impact on the usage.
confirmed ✔ CODE & Office works fine
here's the latest raw entry for me:
{"reqId":"q3jH45E5dilZ7BphVW0n","level":3,"time":"2024-10-15T08:49:28+00:00","remoteAddr":"REDACTED","user":"REDACTED","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"unlink(/var/www/nextcloud/data/appdata_ocgfs89mpg4c/richdocuments/remoteData/discovery): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#348","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.14.0daily (Nextcloud, macos-24.0.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"29.0.8.1","data":{"app":"PHP"},"id":"6710f5ca815ed"}