[Bug]: 0x800701AA and 0x80070185 resulting in error 404 and not being able to download file thru client
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ 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
Some random files are not available to query thru "index.php/core/preview?fileId=00161436ocad9kxu2atw&x=96&y=96&a=true" with results of [] which results in those files not being able to download using client.
Apache2 log say it results in 404
192.168.51.1 - "" [31/Jan/2025:18:43:44 +0100] "GET /index.php/core/preview?fileId=00161436ocad9kxu2atw&x=96&y=96&a=true HTTP/1.1" 404 814 "-" "Mozilla/5.0 (Windows) mirall/3.15.3 (build 20250107) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
Files is data folder, file is in database
SELECT * FROM oc_filecache WHERE fileid = '00161436ocad9kxu2atw';
return:
| 161436 | 22 | files/Prezenty dla pilotów/2025/AM010124 TAD.pdf | 6a6a0cfc59b4283f35665c032adb9071 | 161433 | AM010124 TAD.pdf | 8 | 7 | 2769270 | 1735830474 | 1735830474 | 0 | 0 | e6f59e957e31b79afb5c91b61debc343 | 27 |
I store data on mounted path via NFS
cd /mnt/nas/
find . -name "AM010124 TAD.pdf"
file is located: /mnt/nas/a.m/files/Prezenty dla pilotów/2025/AM010124 TAD.pdf
Requesting it this way:
curl -u "administrator:password" -X PROPFIND "https://cloud.FQDN.com/remote.php/dav/files/administrator/Prezenty%20dla%20pilot%C3%B3w/2025/AM010124%20TAD.pdf"
give me this results:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response><d:href>/remote.php/dav/files/administrator/Prezenty%20dla%20pilot%c3%b3w/2025/AM010124%20TAD.pdf</d:href><d:propstat><d:prop><d:getlastmodified>Thu, 02 Jan 2025 15:07:54 GMT</d:getlastmodified><d:getcontentlength>2769270</d:getcontentlength><d:resourcetype/><d:getetag>"e6f59e957e31b79afb5c91b61debc343"</d:getetag><d:getcontenttype>application/pdf</d:getcontenttype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>
I tried file scan:
sudo sudo -c "php /var/www/nextcloud/occ files:scan a.m" www-data -s /bin/bash
returns:
Cannot load Zend OPcache - it was already loaded
Starting scan for user 1 out of 1 (a.m)
+---------+-------+-----+---------+---------+--------+--------------+
| Folders | Files | New | Updated | Removed | Errors | Elapsed time |
+---------+-------+-----+---------+---------+--------+--------------+
| 66 | 426 | 0 | 201 | 0 | 0 | 00:00:03 |
+---------+-------+-----+---------+---------+--------+--------------+
but that didn't help
this issue was present on 29.x and is also present on 30.x
Steps to reproduce
- this is random but you have to have VFS enabled (because other way you would have those files locally)
- unable to replicate at-hoc
- if the error occurs I can only download file thru webui or by "store locally" on client.
Expected behavior
being able to download files that is on nextcloud
Nextcloud Server version
30
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"192.168.51.200",
"cloud.FQDN.com"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "30.0.5.1",
"overwrite.cli.url": "https:\/\/cloud.FQDN.com",
"htaccess.RewriteBase": "\/",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"memcache.local": "\\OC\\Memcache\\APCu",
"maintenance_window_start": 1,
"filelocking.enabled": true,
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"default_language": "pl",
"default_phone_region": "PL",
"default_timezone": "Europe\/Warsaw",
"allow_user_to_change_display_name": true,
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtpport": "587",
"mail_sendmailmode": "smtp",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"skeletondirectory": "\/var\/www\/nextcloud\/core\/skeleton_empty",
"app_install_overwrite": [
"files_downloadactivity",
"files_trackdownloads",
"ransomware_protection"
],
"maintenance": false,
"theme": "",
"loglevel": 2,
"forbidden_filename_basenames": [
"con",
"prn",
"aux",
"nul",
"com0",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"com\u00b9",
"com\u00b2",
"com\u00b3",
"lpt0",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"lpt\u00b9",
"lpt\u00b2",
"lpt\u00b3"
],
"forbidden_filename_characters": [
"<",
">",
":",
"\"",
"|",
"?",
"*",
"\\",
"\/"
],
"forbidden_filename_extensions": [
" ",
".",
".filepart",
".part"
]
}
}
List of activated Apps
Enabled:
- activity: 3.0.0
- admin_audit: 1.20.0
- calendar: 5.0.9
- circles: 30.0.0
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- contactsinteraction: 1.11.0
- dashboard: 7.10.0
- dav: 1.31.1
- federatedfilesharing: 1.20.0
- federation: 1.20.0
- files: 2.2.0
- files_accesscontrol: 1.20.1
- files_downloadlimit: 3.0.0
- files_pdfviewer: 3.0.0
- files_reminders: 1.3.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- impersonate: 1.17.1
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- notifications: 3.0.0
- oauth2: 1.18.1
- password_policy: 2.0.0
- photos: 3.0.2
- privacy: 2.0.0
- provisioning_api: 1.20.0
- recommendations: 3.0.0
- related_resources: 1.5.0
- serverinfo: 2.0.0
- settings: 1.13.0
- sharebymail: 1.20.0
- text: 4.1.0
- theming: 2.5.0
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_status: 1.10.0
- viewer: 3.0.0
- weather_status: 1.10.0
- webhook_listeners: 1.1.0-dev
- workflowengine: 2.12.0
Disabled:
- app_api: 4.0.5 (installed 4.0.5)
- bruteforcesettings: 3.0.0 (installed 3.0.0)
- encryption: 2.18.0
- files_external: 1.22.0
- firstrunwizard: 3.0.0 (installed 3.0.0)
- groupfolders: 18.0.9 (installed 18.0.9)
- nextcloud_announcements: 2.0.0 (installed 2.0.0)
- notes: 4.11.0 (installed 4.11.0)
- support: 2.0.0 (installed 1.12.0)
- survey_client: 2.0.0 (installed 2.0.0)
- suspicious_login: 8.0.0
- systemtags: 1.20.0 (installed 1.20.0)
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
- user_ldap: 1.21.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{"reqId":"nj46QBqvbY9g9g1oQmxH","level":0,"time":"2025-01-31T18:54:56+00:00","remoteAddr":"192.168.51.1","user":"--","app":"no app in context","method":"GET","url":"/index.php/core/preview?fileId=00161436ocad9kxu2atw&x=96&y=96&a=true","message":"The loading of lazy AppConfig values have been requested","userAgent":"Mozilla/5.0","version":"30.0.5.1","exception":{"Exception":"RuntimeException","Message":"ignorable exception","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":1180,"function":"loadConfig","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":100,"function":"loadConfigAll","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AllConfig.php","line":169,"function":"getKeys","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","line":95,"function":"getAppKeys","class":"OC\\AllConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","line":175,"function":"isBypassListed","class":"OC\\Security\\Bruteforce\\Throttler","type":"->"},{"file":"/var/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","line":192,"function":"getAttempts","class":"OC\\Security\\Bruteforce\\Throttler","type":"->"},{"file":"/var/www/nextcloud/lib/private/Security/Bruteforce/Throttler.php","line":265,"function":"getDelay","class":"OC\\Security\\Bruteforce\\Throttler","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":383,"function":"sleepDelayOrThrowOnMax","class":"OC\\Security\\Bruteforce\\Throttler","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":543,"function":"logClientIn","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/base.php","line":1088,"function":"tryBasicAuthLogin","class":"OC\\User\\Session","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":992,"function":"handleLogin","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppConfig.php","Line":1194,"message":"The loading of lazy AppConfig values have been requested","exception":{},"CustomMessage":"The loading of lazy AppConfig values have been requested"}}
{"reqId":"cKxEVboPydxpVkNNP4UE","level":3,"time":"2025-01-31T18:44:59+00:00","remoteAddr":"192.168.51.1","user":"administrator","app":"index","method":"GET","url":"/settings/api/apps/media?fileName=https%3A%2F%2Fnextcloud.com%2Fc%2Fuploads%2F2024%2F09%2FNextcloud-Hub-9-1024x576.jpg","message":"Exception thrown: OCP\\Files\\NotFoundException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0","version":"30.0.5.1","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/Node/Folder.php","line":81,"function":"getFileInfo","class":"OC\\Files\\Node\\Node","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFolder.php","line":33,"function":"getDirectoryListing","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":149,"function":"getDirectoryListing","class":"OC\\Files\\SimpleFS\\SimpleFolder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"getAppDiscoverMedia","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1003,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/Node.php","Line":90,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\NotFoundException"}}
{"reqId":"JJQ5AMLoAPk2mDXBdCAn","level":3,"time":"2025-01-31T18:44:59+00:00","remoteAddr":"192.168.51.1","user":"administrator","app":"index","method":"GET","url":"/settings/api/apps/media?fileName=https%3A%2F%2Fgithub.com%2Fnextcloud%2Ffirstrunwizard%2Fraw%2Fmaster%2Fimg%2FNextcloud.webm","message":"Exception thrown: OCP\\Files\\NotFoundException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0","version":"30.0.5.1","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/Node/Folder.php","line":81,"function":"getFileInfo","class":"OC\\Files\\Node\\Node","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFolder.php","line":33,"function":"getDirectoryListing","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":149,"function":"getDirectoryListing","class":"OC\\Files\\SimpleFS\\SimpleFolder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"getAppDiscoverMedia","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1003,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Files/Node/Node.php","Line":90,"message":"","exception":{},"CustomMessage":"Exception thrown: OCP\\Files\\NotFoundException"}}
{"reqId":"yNL1N7K5J25ZvmCX88rT","level":0,"time":"2025-01-31T18:50:44+00:00","remoteAddr":"192.168.51.1","user":"administrator","app":"workflowengine","method":"PROPFIND","url":"/remote.php/dav/files/administrator/","message":"Flow activation: rules were requested for operation Zablokuj dost\u0119p do pliku","userAgent":"Mozilla/5.0 (Windows) mirall/3.15.3 (build 20250107) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"30.0.5.1","data":{"app":"workflowengine","level":"0"}}
{"reqId":"QhDQ584AEnchArVFGN9t","level":0,"time":"2025-01-31T18:51:07+00:00","remoteAddr":"192.168.51.1","user":"administrator","app":"workflowengine","method":"PROPFIND","url":"/remote.php/dav/files/administrator/Zlecenia%20dla%20pilot%C3%B3w/2025","message":"Flow activation: rules were requested for operation Zablokuj dost\u0119p do pliku","userAgent":"Mozilla/5.0 (Windows) mirall/3.15.3 (build 20250107) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"30.0.5.1","data":{"app":"workflowengine","level":"0"}}
Additional info
https://github.com/nextcloud/desktop/issues/7747
sudo -u www-data php occ security:bruteforce:attempts 192.168.51.1
Cannot load Zend OPcache - it was already loaded
- bypass-listed: false
- attempts: 2
- delay: 400
sudo -u www-data php occ security:bruteforce:reset 192.168.51.1
does not help
Adding my ip to bruteforce-setting list does not help:
Your remote address was identified as "192.168.51.1" and is bypassing brute-force protection.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the index.php/core/preview endpoint and the occ files:scan command described in the report, then investigate the failing file's database entry and mounted NFS path under the VFS setup. Reproduce the intermittent 404 and compare preview, WebDAV, client download, and web UI behavior; done means affected files download successfully through the client.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache, mariadb, php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100