nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.16k stars 1.75k forks source link

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

Open asandikci opened 2 weeks ago

asandikci commented 2 weeks ago

⚠️ Before posting ⚠️

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 commented 2 weeks ago

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