android icon indicating copy to clipboard operation
android copied to clipboard

Bug: Auto upload continues and consumes data even if storage limit has been reached

Open asandikci opened this issue 1 year ago • 1 comments

⚠️ Before posting ⚠️

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

Steps to reproduce

  1. Set storage limit for a specific user in nextcloud server
  2. Install android app and log in as this user
  3. Open the Auto-upload for a specific folder (not used default camera folder but this could not be the actual case)
  4. Start the fill this folder with pictures/videos
  5. Full the storage with pictures/videos (I guess type does not matter)

Expected behaviour

When Storage limit has been reached auto-upload should be stopped!

Actual behaviour

Nextcloud Android app tries to upload files again and again and consumes lots of data! (I didn't realize it for a while and consumed 10GiB of data!)

Android version

11

Device brand and model

General Mobile G501

Stock or custom OS?

Stock

Nextcloud android app version

3.29.1

Nextcloud server version

28.0.5

Using a reverse proxy?

No

Android logs

Server error logs

An Example (there are lots of log like this):

{
  "reqId": "REPLACED_FOR_PRIVACY",
  "level": 3,
  "time": "2024-08-24T13:REPLACED_FOR_PRIVACY",
  "remoteAddr": "REPLACED_FOR_PRIVACY",
  "user": "REPLACED_FOR_PRIVACY",
  "app": "webdav",
  "method": "PUT",
  "url": "/remote.php/dav/files/REPLACED_FOR_PRIVACY/Photos/Camera/REPLACED_FOR_PRIVACY.jpg",
  "message": "Insufficient space in /Photos/Camera/REPLACED_FOR_PRIVACY.jpg, 4055436 required, 441120 available",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.29.1",
  "version": "28.0.5.1",
  "exception": {
    "Exception": "Sabre\\DAV\\Exception\\InsufficientStorage",
    "Message": "Insufficient space in /Photos/Camera/REPLACED_FOR_PRIVACY.jpg, 4055436 required, 441120 available",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/QuotaPlugin.php",
        "line": 97,
        "function": "checkQuota",
        "class": "OCA\\DAV\\Connector\\Sabre\\QuotaPlugin",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "beforeCreateFile",
        "class": "OCA\\DAV\\Connector\\Sabre\\QuotaPlugin",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 1094,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "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": 373,
        "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/QuotaPlugin.php",
    "Line": 216,
    "message": "Insufficient space in /Photos/Camera/REPLACED_FOR_PRIVACY.jpg, 4055436 required, 441120 available",
    "exception": [],
    "CustomMessage": "Insufficient space in /Photos/Camera/REPLACED_FOR_PRIVACY.jpg, 4055436 required, 441120 available"
  },
  "id": "REPLACED_FOR_PRIVACY"
}

Additional information

phone is not mine and could not get Android logs

asandikci avatar Aug 24 '24 19:08 asandikci

tested with cellular data (unchecked "only upload unmetered Wi-Fi" option)

asandikci avatar Aug 24 '24 19:08 asandikci

oh, sorry for the duplicate

asandikci avatar Feb 25 '25 15:02 asandikci