Files not on server but in android app and web are accessible

Nextcloud version 26.0.3snap
Operating system and version Ubuntu 18.04.5 LTS

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Upload file through android app
  2. Files visible in web interface and android app
  3. Can not locate files locally on server folders not even files are there on the right location.

I checked on my local computer via samba even locally in folder by listing all files with ls -al on server.

More info:
Sooner it worked ok but then i had problem with certificate validation a finally got it replaced and working again but something strange is happening.
Looks like nextcloud is hiding files in some cache and not showing them on disk.

More more info:
I have changed root nextcloud folder for my local folder on another disk.
All previous files are there and accessible, but new files exist only “virtually”.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"R7OK7ylUzoZw9u3HU30C","level":3,"time":"2023-08-05T13:42:09+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/jones/191112fb4c652f5bf216c3d5c436c79e/0000000000000000-0000000002395471","message":"Expected filesize of 2395471 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 1671168 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"26.0.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 2395471 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 1671168 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Connector/Sabre/Directory.php","line":149,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Upload/UploadFolder.php","line":50,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/remote.php","line":172,"args":["/snap/nextcloud/35878/htdocs/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Connector/Sabre/File.php","Line":297,"message":"Expected filesize of 2395471 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 1671168 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","exception":{},"CustomMessage":"Expected filesize of 2395471 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 1671168 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."}}
{"reqId":"VWLnK3j5uziSnO3Pwvmj","level":3,"time":"2023-08-05T13:46:04+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/jones/cb2b2bc9f0dbb9234f0528ba95c24089/0000000000000000-0000000004996551","message":"Expected filesize of 4996551 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 4775936 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"26.0.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 4996551 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 4775936 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","Code":0,"Trace":[{"file":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Connector/Sabre/Directory.php","line":149,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Upload/UploadFolder.php","line":50,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/remote.php","line":172,"args":["/snap/nextcloud/35878/htdocs/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Connector/Sabre/File.php","Line":297,"message":"Expected filesize of 4996551 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 4775936 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","exception":{},"CustomMessage":"Expected filesize of 4996551 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 4775936 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."}}
{"reqId":"ynZBiup30gUnV5YUKV4a","level":3,"time":"2023-08-05T14:16:45+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/jones/InstantUpload/Camera/2023/","message":"file_get_contents(/media/nextcloud/data/jones/files/InstantUpload/Camera/2023/03/Readme.md): Failed to open stream: No such file or directory at /snap/nextcloud/35878/htdocs/lib/private/Files/Storage/Local.php#305","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"26.0.3.2","data":{"app":"PHP"}}
{"reqId":"59anw2tHsFUxSwaJvhAk","level":3,"time":"2023-08-05T14:44:12+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"no app in context","method":"POST","url":"/remote.php/dav/bulk","message":"Unexpected EOF while reading stream.","userAgent":"Mozilla/5.0 (Windows) mirall/3.9.1stable-Win64 (build 20230725) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.3.2","data":[]}
{"reqId":"CJz1DOoz8zyEioRxzr33","level":3,"time":"2023-08-05T14:45:21+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"no app in context","method":"POST","url":"/remote.php/dav/bulk","message":"Unexpected EOF while reading stream.","userAgent":"Mozilla/5.0 (Windows) mirall/3.9.1stable-Win64 (build 20230725) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.3.2","data":[]}
{"reqId":"fmle8WeG0FgfFcC8Q94E","level":3,"time":"2023-08-05T14:46:50+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"webdav","method":"GET","url":"/remote.php/dav/files/jones/InstantUpload/Camera/VID_20221030_015438.mp4","message":"Could not open file","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.25.0","version":"26.0.3.2","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Could not open file","Code":0,"Trace":[{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Server.php","line":366,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/snap/nextcloud/35878/htdocs/remote.php","line":172,"args":["/snap/nextcloud/35878/htdocs/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/snap/nextcloud/35878/htdocs/apps/dav/lib/Connector/Sabre/File.php","Line":498,"message":"Could not open file","exception":{},"CustomMessage":"Could not open file"}}
{"reqId":"H88dSaPWhlxiAsL10KAY","level":3,"time":"2023-08-05T14:46:56+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"no app in context","method":"POST","url":"/remote.php/dav/bulk","message":"Unexpected EOF while reading stream.","userAgent":"Mozilla/5.0 (Windows) mirall/3.9.1stable-Win64 (build 20230725) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.3.2","data":[]}
{"reqId":"AaTkPxHyaSSpqIFJQOow","level":3,"time":"2023-08-05T14:47:42+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"no app in context","method":"POST","url":"/remote.php/dav/bulk","message":"Unexpected EOF while reading stream.","userAgent":"Mozilla/5.0 (Windows) mirall/3.9.1stable-Win64 (build 20230725) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.3.2","data":[]}
{"reqId":"w6bUhXt27wHFukkT4y0A","level":3,"time":"2023-08-05T14:51:39+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"no app in context","method":"POST","url":"/remote.php/dav/bulk","message":"Unexpected EOF while reading stream.","userAgent":"Mozilla/5.0 (Windows) mirall/3.9.1stable-Win64 (build 20230725) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.3.2","data":[]}
{"reqId":"Nsj7UtC8UfSW13h1HPg6","level":3,"time":"2023-08-05T15:16:38+00:00","remoteAddr":"192.168.1.1","user":"jones","app":"no app in context","method":"POST","url":"/remote.php/dav/bulk","message":"Unexpected EOF while reading stream.","userAgent":"Mozilla/5.0 (Windows) mirall/3.9.1stable-Win64 (build 20230725) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.3.2","data":[]}

Hi @Jiri_Strakos - Your report is a little hard to follow.

It sounds like you moved your NC datadirectroy to another disk and now your files aren’t accessible?

What process - precisely - did you follow to move your data?

It sounds like you moved the on-disk data, but did not tell NC. NC only has access to its database, but not the actual files themselves if you moved them.

https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#troubleshooting-data-directory

Thank you very much.
Configuration was OK but the problem was that somehow my folder /media/nextcloud/data lost connection to my hard disk.
I originally mounted NC folder with ‘mount --bind’ but this somehow got removed.
So I needed to mount it again and it works now.

1 Like