Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video File was marked as uploaded, but file size is much smaller / file corrupted #12990

Open
4 tasks done
GAS85 opened this issue May 7, 2024 · 0 comments
Open
4 tasks done
Labels
bug feature: auto upload feature: sync and upload Syncing or uploading (that isn't auto upload specific)

Comments

@GAS85
Copy link

GAS85 commented May 7, 2024

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Setup Video auto upload
  2. Make a video around 200+ MB
  3. Upload will be triggered on a poor connection (upload speed 1,2 Mbps). изображение
  4. See multiple retries and errors in NC Server logs
  5. Finally file marked as uploaded
  6. Check file on a server and it has totally different size: 34 MB, vs 200+ MB original file. Screenshot_20240507_122856_Firefox
    Screenshot_20240507_122814_Nextcloud

Expected behaviour

App can check if file was uploaded successfully even with network errors and retries. At least final File size must be compared, better is to implement checksum comparison such as SHA256

Actual behaviour

There is no file size or any checksum comparison after upload, if file was corrupted, user will never know about this issue till he need this file...

Android version

14

Device brand and model

Samsung Galaxy S21 FE

Stock or custom OS?

Stock

Nextcloud android app version

3.29.0

Nextcloud server version

27.1.9

Using a reverse proxy?

No

Android logs

No response

Server error logs

{"reqId":"7BikhEPL8fyMuKuyfKUk","level":3,"time":"2024-05-07T10:26:07+00:00","remoteAddr":"256.256.256.256","user":"USER","app":"no app in context","method":"PUT","url":"/remote.php/dav/uploads/USER/c13848381ac9cc02b15f8c9ef9160fb2/000003","message":"Expected filesize of 40128855 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 31105024 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.29.0","version":"27.1.9.1","exception":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"Expected filesize of 40128855 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 31105024 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":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":149,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php","line":50,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":368,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":297,"message":"Expected filesize of 40128855 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 31105024 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 40128855 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 31105024 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."},"id":"663a07385952c"}
Same as formatted JSON
{
   "app" : "no app in context",
   "exception" : {
      "Code" : 0,
      "CustomMessage" : "Expected filesize of 40128855 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 31105024 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.",
      "Exception" : "Sabre\\DAV\\Exception\\BadRequest",
      "File" : "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
      "Line" : 297,
      "Message" : "Expected filesize of 40128855 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 31105024 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.",
      "Trace" : [
         {
            "class" : "OCA\\DAV\\Connector\\Sabre\\File",
            "file" : "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php",
            "function" : "put",
            "line" : 149,
            "type" : "->"
         },
         {
            "args" : [
               "*** sensitive parameters replaced ***"
            ],
            "class" : "OCA\\DAV\\Connector\\Sabre\\Directory",
            "file" : "/var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php",
            "function" : "createFile",
            "line" : 50,
            "type" : "->"
         },
         {
            "args" : [
               "*** sensitive parameters replaced ***"
            ],
            "class" : "OCA\\DAV\\Upload\\UploadFolder",
            "file" : "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
            "function" : "createFile",
            "line" : 1098,
            "type" : "->"
         },
         {
            "args" : [
               "*** sensitive parameters replaced ***"
            ],
            "class" : "Sabre\\DAV\\Server",
            "file" : "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
            "function" : "createFile",
            "line" : 504,
            "type" : "->"
         },
         {
            "class" : "Sabre\\DAV\\CorePlugin",
            "file" : "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
            "function" : "httpPut",
            "line" : 89,
            "type" : "->"
         },
         {
            "class" : "Sabre\\DAV\\Server",
            "file" : "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
            "function" : "emit",
            "line" : 472,
            "type" : "->"
         },
         {
            "class" : "Sabre\\DAV\\Server",
            "file" : "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
            "function" : "invokeMethod",
            "line" : 253,
            "type" : "->"
         },
         {
            "class" : "Sabre\\DAV\\Server",
            "file" : "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
            "function" : "start",
            "line" : 321,
            "type" : "->"
         },
         {
            "class" : "Sabre\\DAV\\Server",
            "file" : "/var/www/nextcloud/apps/dav/lib/Server.php",
            "function" : "exec",
            "line" : 368,
            "type" : "->"
         },
         {
            "class" : "OCA\\DAV\\Server",
            "file" : "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
            "function" : "exec",
            "line" : 35,
            "type" : "->"
         },
         {
            "args" : [
               "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
            ],
            "file" : "/var/www/nextcloud/remote.php",
            "function" : "require_once",
            "line" : 172
         }
      ],
      "exception" : [],
      "message" : "Expected filesize of 40128855 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 31105024 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."
   },
   "id" : "663a07385952c",
   "level" : 3,
   "message" : "Expected filesize of 40128855 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 31105024 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.",
   "method" : "PUT",
   "remoteAddr" : "256.256.256.256",
   "reqId" : "7BikhEPL8fyMuKuyfKUk",
   "time" : "2024-05-07T10:26:07+00:00",
   "url" : "/remote.php/dav/uploads/USER/c13848381ac9cc02b15f8c9ef9160fb2/000003",
   "user" : "USER",
   "userAgent" : "Mozilla/5.0 (Android) Nextcloud-android/3.29.0",
   "version" : "27.1.9.1"
}

Additional information

I do not have laptop to access my phone with logcat during vacation.

@GAS85 GAS85 added the bug label May 7, 2024
@joshtrichards joshtrichards added feature: auto upload feature: sync and upload Syncing or uploading (that isn't auto upload specific) labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature: auto upload feature: sync and upload Syncing or uploading (that isn't auto upload specific)
Projects
None yet
Development

No branches or pull requests

2 participants