This file no longer exists on web interface

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.8.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 22.04.5 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • Apache/2.4.52 (Ubuntu) (fpm-fcgi)
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx/1.26.0
  • PHP version (e.g, 8.3):
    • 8.3.19
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Few days ago
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Hyper-V VM
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

There are files that can’t be opened any more. The error on the web interface is “This file no longer exists”. But the file is available on the harddisk.
The sync client has the same issue (but the issue also persist without a sync client, so we can rule this out)
Every time the file is clicked and the error is shown, an extra record is added to the oc_filecache table, with only a new fileid.

Steps to replicate it :

It is mainly focused on one user, but I also see that another user should have this issue.

I’ve deleted all the oc_filecache records that exist more then ones
with:
select concat(‘delete from oc_filecache where path_hash='’,path_hash,‘' and parent=’,parent,’ and etag='‘,etag,’';') as wislijst from oc_filecache where path like ‘files/%’ group by path, path_hash, parent, name, etag having count()>1;*

And did an occ files:scan

That results in two (double) records in the oc_filecache table.

Also deleting one of the records, doesn’t resolve it. So the issue doesn’t seems to be in the oc_filecache table.

Log entries

Nextcloud

{"reqId":"MPG1Z7MF27wWlboYWr7L","level":3,"time":"2025-03-23T20:37:43+00:00","remoteAddr":"192.168.2.25","user":"xxx","app":"PHP","method":"GET","url":"/index.php/apps/files/files/997796?dir=/Infobladen%20rassen/Noorse%20Boskat%20%28copy%29/OUD-Noorse%20Boskat","message":"file_put_contents(/hdd/data/appdata_ocy7agzabjz3/js/core/merged-template-prepend.js): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#304","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"30.0.8.1","data":{"app":"PHP"}}
{"reqId":"MPG1Z7MF27wWlboYWr7L","level":3,"time":"2025-03-23T20:37:43+00:00","remoteAddr":"192.168.2.25","user":"xxx","app":"no app in context","method":"GET","url":"/index.php/apps/files/files/997796?dir=/Infobladen%20rassen/Noorse%20Boskat%20%28copy%29/OUD-Noorse%20Boskat","message":"JSCombiner: unable to cache: merged-template-prepend.js","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"30.0.8.1","data":[]}
{"reqId":"MPG1Z7MF27wWlboYWr7L","level":1,"time":"2025-03-23T20:37:44+00:00","remoteAddr":"192.168.2.25","user":"xxx","app":"no app in context","method":"GET","url":"/index.php/apps/files/files/997796?dir=/Infobladen%20rassen/Noorse%20Boskat%20%28copy%29/OUD-Noorse%20Boskat","message":"Capabilities of OCA\\Support\\Capabilities took 0.26 seconds to generate.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"30.0.8.1","data":[]}
{"reqId":"MPG1Z7MF27wWlboYWr7L","level":3,"time":"2025-03-23T20:37:44+00:00","remoteAddr":"192.168.2.25","user":"xxx","app":"PHP","method":"GET","url":"/index.php/apps/files/files/997796?dir=/Infobladen%20rassen/Noorse%20Boskat%20%28copy%29/OUD-Noorse%20Boskat","message":"chmod(): Operation not permitted at /var/www/nextcloud/lib/private/Log/File.php#55","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","version":"30.0.8.1","data":{"app":"PHP"}}
{"reqId":"kbvK9rKtBUrGKwS2yP0d","level":2,"time":"2025-03-23T20:37:58+00:00","remoteAddr":"192.168.2.25","user":"fabian","app":"suspicious_login","method":"GET","url":"/ocs/v2.php/apps/serverinfo/api/v1/info?format=json&skipUpdate=false&skipApps=false","message":"Could not predict suspiciousness: No models found","userAgent":"python-requests/2.32.3","version":"30.0.8.1","data":{"app":"suspicious_login"}}
{"reqId":"kbvK9rKtBUrGKwS2yP0d","level":3,"time":"2025-03-23T20:37:58+00:00","remoteAddr":"192.168.2.25","user":"fabian","app":"PHP","method":"GET","url":"/ocs/v2.php/apps/serverinfo/api/v1/info?format=json&skipUpdate=false&skipApps=false","message":"file_get_contents(/hdd/data/appdata_ocy7agzabjz3/appstore/apps.json): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#296","userAgent":"python-requests/2.32.3","version":"30.0.8.1","data":{"app":"PHP"}}

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

network
- files?v=9fb4805b with status 200
- Noorse(....) fetch 404  xhr-request.js:126

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

Access.log
192.168.2.54 - - [23/Mar/2025:21:44:35 +0100] "GET /index.php/apps/files/api/v1/views HTTP/1.1" 200 1522 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
192.168.2.54 - - [23/Mar/2025:21:44:36 +0100] "PROPFIND /remote.php/dav/files/xxx/Infobladen%20rassen/Noorse%20Boskat%20(copy)/OUD-Noorse%20Boskat/Noorse%20Boskat%20-%20infoblad%20ras%20V1.docx HTTP/1.1" 404 1070 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.diligente.nl",
            "192.168.2.242",
            "bestanden.pvddhhnk.nl",
            "zwerfdierfoto.purecoverz.nl"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.8.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "587",
        "auth.bruteforce.protection.enabled": false,
        "maintenance_window_start": 1,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0
        },
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED",
            "HTTP_FORWARDED_FOR"
        ],
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud.log",
        "loglevel": 1,
        "updater.release.channel": "stable",
        "maintenance": false,
        "theme": "",
        "app_install_overwrite": [
            "calendar"
        ],
        "mysql.utf8mb4": true,
        "overwrite.cli.url": "http:\/\/nextcloud.diligente.nl",
        "default_language": "nl",
        "default_locale": "nl_NL",
        "overwriteprotocol": "https",
        "default_phone_region": "NL",
        "has_rebuilt_cache": true,
        "mail_sendmailmode": "smtp",
        "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"
        ],
        "memories.exiftool": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\Movie"
        ],
        "memories.gis_type": 1,
        "memories.vod.disable": false,
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "data-fingerprint": "59302cb45c9d087e07160ce9c102aead"
    }
}

Apps

The output of occ app:list (if possible).

Enabled:

  • activity: 3.0.0
  • announcementcenter: 7.1.0
  • app_api: 4.0.6
  • bruteforcesettings: 3.0.0
  • calendar: 5.2.0
  • call_summary_bot: 2.0.1
  • circles: 30.0.0
  • cloud_federation_api: 1.13.0
  • comments: 1.20.1
  • contacts: 7.0.4
  • contactsinteraction: 1.11.0
  • dashboard: 7.10.0
  • dav: 1.31.1
  • deck: 1.14.4
  • dicomviewer: 2.3.0
  • external: 5.5.2
  • federatedfilesharing: 1.20.0
  • federation: 1.20.0
  • files: 2.2.0
  • files_accesscontrol: 1.20.1
  • files_automatedtagging: 1.20.0
  • files_downloadlimit: 3.0.0
  • files_pdfviewer: 3.0.0
  • files_reminders: 1.3.0
  • files_retention: 1.19.0
  • files_sharing: 1.22.0
  • files_trashbin: 1.20.1
  • files_versions: 1.23.0
  • firstrunwizard: 3.0.0
  • groupfolders: 18.1.2
  • integration_giphy: 2.0.1
  • integration_mastodon: 3.1.1
  • lookup_server_connector: 1.18.0
  • maps: 1.5.0
  • memories: 7.5.2
  • music: 2.1.2
  • news: 25.3.0
  • nextcloud_announcements: 2.0.0
  • notes: 4.11.0
  • notifications: 3.0.0
  • oauth2: 1.18.1
  • password_policy: 2.0.0
  • photos: 3.0.2
  • previewgenerator: 5.8.0
  • privacy: 2.0.0
  • provisioning_api: 1.20.0
  • quicknotes: 0.8.30
  • recognize: 8.2.0
  • recommendations: 3.0.0
  • related_resources: 1.5.0
  • richdocuments: 8.5.5
  • richdocumentscode: 24.4.1302
  • serverinfo: 2.0.0
  • settings: 1.13.0
  • sharebymail: 1.20.0
  • spreed: 20.1.5
  • support: 2.0.0
  • survey_client: 2.0.0
  • suspicious_login: 8.0.0
  • systemtags: 1.20.0
  • tasks: 0.16.1
  • text: 4.1.0
  • theming: 2.6.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
  • whiteboard: 1.0.5
  • workflowengine: 2.12.0
    Disabled:
  • admin_audit: 1.20.0
  • assistant: 2.4.0 (installed 2.4.0)
  • carnet: 0.25.6 (installed 0.25.6)
  • collectives: 2.16.1 (installed 2.16.1)
  • encryption: 2.18.0
  • files_external: 1.22.0
  • files_readmemd: 3.0.2 (installed 3.0.2)
  • files_rightclick: 0.15.1 (installed 1.6.0)
  • logreader: 3.0.0 (installed 3.0.0)
  • onlyoffice: 9.7.0 (installed 9.7.0)
  • twofactor_nextcloud_notification: 4.0.0
  • twofactor_totp: 12.0.0-dev
  • user_ldap: 1.21.0

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

I was not able to find the source of the problems.

But I’ve run this query to delete all unwanted records in oc_filecache

DELETE f1 
FROM oc_filecache f1 
JOIN (     
   SELECT MAX(f2.fileid) AS max_fileid, f2.path_hash, f2.parent
   FROM oc_filecache f2
   GROUP BY f2.path_hash, f2.parent ) AS subquery 
ON f1.path_hash = subquery.path_hash 
AND f1.parent = subquery.parent 
AND f1.fileid < subquery.max_fileid 
AND f1.path like 'files/%';

I’ve deleted records in the oc_filecache of files that are no longer on the disk.
and I’ve turned off all caching of Nextcloud. I did this because I want to make it simpler (just database and filesystem, not the cache doing things). Next week I will turn it on again.

For now, it seems to work. Users need a little more patience. Even the filesync to Windows works (upgraded to the latest client to make sure)

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