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

Instant upload randomly fails over and over: maintenance mode, Permission error, etc. #10805

Open
skjnldsv opened this issue Oct 16, 2022 · 2 comments
Labels
2. developing bug connectivity DNS, TLS, proxies, network connection, etc. related matter feature: auto upload

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Oct 16, 2022

Steps to reproduce

  1. Setup Nextcloud
  2. Have auto upload enabled on Android
  3. Take pictures
  4. Sometimes it gets uploaded, sometimes it fails and keep repeating over and over.
    Most received error message is: Server is in maintenance mode. But it is NOT, and I'm using the web UI
    Sometimes it's: Permission error

Expected behaviour

  • Upload should work
  • If failure, there should be a limit where we keep retrying or all my battery gets drained

Actual behaviour

  • Battery is drained
  • Upload is unsuccessful
  • Error messages are incorrect

Android version: 10

Device brand and model: Xiaomi Mi A2

Stock or custom OS: Stock

Nextcloud android app version: 3.21.2

Nextcloud server version: 24.0.6.1

Using a reverse proxy: Yes, not NGINX.

Android logs

10-16 16:54:25.648 31542  5128 D OwnCloudClient #0: REQUEST MKCOL /remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964
10-16 16:54:26.625 31542  5128 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964
10-16 16:54:26.625 31542  5128 D AdvancedSslSocketFactory: Creating SSL Socket with remote domain.com:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@687b583
10-16 16:54:26.627 31542  5128 D AdvancedSslSocketFactory:  ... with connection timeout 5000 and socket timeout 40000
10-16 16:54:26.629 31542  5128 I ServerNameIndicator: SNI done, hostname: domain.com
10-16 16:54:26.937 31542  5128 D OwnCloudClient #0: REQUEST PUT /remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999
10-16 16:54:30.716 31542  5128 D ChunkedFileUploadRemoteOperation: Upload of /storage/emulated/0/DCIM/Camera/VID_20221016_155502000.mp4 to /InstantUpload/2022/10/VID_20221016_155502000.mp4, chunk from 0000000000000000 to 0000000010239999 size: 10240000, HTTP result status 201
10-16 16:54:30.717 31542  5128 D OwnCloudClient #0: REQUEST PUT /remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/0000000010240000-0000000017616975
10-16 16:54:34.298 31542  5128 D ChunkedFileUploadRemoteOperation: Upload of /storage/emulated/0/DCIM/Camera/VID_20221016_155502000.mp4 to /InstantUpload/2022/10/VID_20221016_155502000.mp4, chunk from 0000000010240000 to 0000000017616975 size: 7376976, HTTP result status 201
10-16 16:54:34.300 31542  5128 D OwnCloudClient #0: REQUEST MOVE /remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file
10-16 16:54:35.525 31542  5128 E UploadFileOperation: Upload of /storage/emulated/0/DCIM/Camera/VID_20221016_155502000.mp4 to /InstantUpload/2022/10/VID_20221016_155502000.mp4: Operation finished with HTTP status code 403 (fail)
10-16 16:54:35.525 31542  5128 D UploadsStorageManager: updateDatabaseUploadResult uploadResult: RemoteOperationResult{mSuccess=false, mHttpCode=403, mHttpPhrase='Forbidden', mException=null, mCode=FORBIDDEN, message='null', getLogMessage='Operation finished with HTTP status code 403 (fail)'} upload: com.owncloud.android.operations.UploadFileOperation@622df5
10-16 16:54:35.537 31542  5128 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/VID_20221016_155502000.mp4 with status:UPLOAD_FAILED and result:PRIVILEGES_ERROR (old:/storage/emulated/0/DCIM/Camera/VID_20221016_155502000.mp4 status:UPLOAD_IN_PROGRESS result:-1)
10-16 16:54:35.538 31542  5128 V UploadsStorageManager: Updating /storage/emulated/0/DCIM/Camera/VID_20221016_155502000.mp4 with status=UPLOAD_FAILED
10-16 16:54:35.568 31542  5128 D UploadsStorageManager: updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/VID_20221016_155502000.mp4
10-16 16:54:35.569 31542  5128 D UploadsStorageManager: notifyObserversNow
10-16 16:54:35.571 31542  5128 D FileUploader: NotifyUploadResult with resultCode: FORBIDDEN
10-16 16:54:35.586 31542 31542 D UploadListAdapter: loadUploadItemsFromDb

Server error logs

{
  "reqId": "zXRZp8rOxjMsirBg5Z6G",
  "level": 0,
  "time": "2022-10-16T15:15:23+00:00",
  "remoteAddr": "192.168.2.254",
  "user": "skjnldsv",
  "app": "core",
  "method": "MOVE",
  "url": "/remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
  "message": "could not get login credentials because the token is invalid: Token does not exist: token does not exist",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.21.2",
  "version": "24.0.6.1",
  "data": {
    "app": "core"
  }
}
{
  "reqId": "zXRZp8rOxjMsirBg5Z6G",
  "level": 0,
  "time": "2022-10-16T15:15:23+00:00",
  "remoteAddr": "192.168.2.254",
  "user": "skjnldsv",
  "app": "webdav",
  "method": "MOVE",
  "url": "/remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
  "message": "",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.21.2",
  "version": "24.0.6.1",
  "exception": {
    "Exception": "Sabre\\DAV\\Exception\\Forbidden",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/apps/dav/lib/Upload/FutureFile.php",
        "line": 100,
        "function": "delete",
        "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 164,
        "function": "delete",
        "class": "OCA\\DAV\\Upload\\FutureFile",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php",
        "line": 94,
        "function": "move",
        "class": "Sabre\\DAV\\Tree",
        "type": "->",
        "args": [
          "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
          "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php",
        "line": 76,
        "function": "performMove",
        "class": "OCA\\DAV\\Upload\\ChunkingPlugin",
        "type": "->",
        "args": [
          "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
          "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "beforeMove",
        "class": "OCA\\DAV\\Upload\\ChunkingPlugin",
        "type": "->",
        "args": [
          "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
          "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 603,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "beforeMove",
          [
            "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
            "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpMove",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:MOVE",
          [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/lib/Server.php",
        "line": 358,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/remote.php",
        "line": 166,
        "args": [
          "/var/www/html/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
    "Line": 320,
    "CustomMessage": "--"
  }
}

Additional information

⚠️ Very important details: the file DOES GET uploaded properly.
The file is seen in my InstantUpload folder. The android app is just not aware that it was a success in the end. 🤷

I am using a cluster setup with a reverse proxy and multiple webservers

  • All instances are clones
  • They're all serving the same data and html ressources
  • Data and config is shared on a remote nfs server

More important details:

  • When uploading on the web UI, the destination used changes
    Android seems to always be using a static hash (md5 of the file maybe?) uploads/skjnldsv/3ee11410d5c8de8a03f72b9b451bc9b5. If an upload fails, it gets triggered on the same path again.
  • Looking on the filesystem, it seems the folders are not cleared properly on a failed upload (there is a cron job for it later on though iirc).
    When it already exists, the two errors happens in the server logs. They are right after the other:
{
  "reqId": "rW59cNPdnK78UYvMsET3",
  "level": 0,
  "time": "2022-10-16T15:10:43+00:00",
  "remoteAddr": "192.168.2.254",
  "user": "skjnldsv",
  "app": "webdav",
  "method": "MKCOL",
  "url": "/remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964",
  "message": "The resource you tried to create already exists",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.21.2",
  "version": "24.0.6.1",
  "exception": {
    "Exception": "Sabre\\DAV\\Exception\\MethodNotAllowed",
    "Message": "The resource you tried to create already exists",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 560,
        "function": "createCollection",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964",
          {
            "__class__": "Sabre\\DAV\\MkCol"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpMkcol",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:MKCOL",
          [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/lib/Server.php",
        "line": 358,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/remote.php",
        "line": 166,
        "args": [
          "/var/www/html/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
    "Line": 1184,
    "CustomMessage": "--"
  }
}
{
  "reqId": "7oMR3aoRBxJXOmSsFMMu",
  "level": 3,
  "time": "2022-10-16T15:10:44+00:00",
  "remoteAddr": "192.168.2.254",
  "user": "skjnldsv",
  "app": "PHP",
  "method": "MOVE",
  "url": "/remote.php/dav/uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
  "message": "fopen(/var/www/html/data/skjnldsv/uploads/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999): Failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#377",
  "userAgent": "Mozilla/5.0 (Android) Nextcloud-android/3.21.2",
  "version": "24.0.6.1",
  "exception": {
    "Exception": "Error",
    "Message": "fopen(/var/www/html/data/skjnldsv/uploads/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999): Failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#377",
    "Code": 0,
    "Trace": [
      {
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::",
        "args": [
          2,
          "fopen(/var/www/html/data/skjnldsv/uploads/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999): Failed to open stream: No such file or directory",
          "/var/www/html/lib/private/Files/Storage/Local.php",
          377
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Storage/Local.php",
        "line": 377,
        "function": "fopen",
        "args": [
          "/var/www/html/data/skjnldsv/uploads/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999",
          "r"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Storage/Wrapper/Quota.php",
        "line": 163,
        "function": "fopen",
        "class": "OC\\Files\\Storage\\Local",
        "type": "->",
        "args": [
          "uploads/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999",
          "r"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php",
        "line": 301,
        "function": "fopen",
        "class": "OC\\Files\\Storage\\Wrapper\\Quota",
        "type": "->",
        "args": [
          "uploads/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999",
          "r"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/View.php",
        "line": 1175,
        "function": "fopen",
        "class": "OC\\Files\\Storage\\Wrapper\\Wrapper",
        "type": "->",
        "args": [
          "uploads/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999",
          "r"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/View.php",
        "line": 1010,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "fopen",
          "/4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999",
          [
            "read"
          ],
          "r"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
        "line": 491,
        "function": "fopen",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "4890f3374f04a79f0603eae9af80f964/0000000000000000-0000000010239999",
          "r"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Upload/AssemblyStream.php",
        "line": 294,
        "function": "get",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/lib/Upload/AssemblyStream.php",
        "line": 144,
        "function": "getStream",
        "class": "OCA\\DAV\\Upload\\AssemblyStream",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\DAV\\Connector\\Sabre\\File"
          }
        ]
      },
      {
        "function": "stream_read",
        "class": "OCA\\DAV\\Upload\\AssemblyStream",
        "type": "->",
        "args": [
          8192
        ]
      },
      {
        "file": "/var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php",
        "line": 55,
        "function": "fread",
        "args": [
          null,
          8192
        ]
      },
      {
        "file": "/var/www/html/apps/files_external/3rdparty/icewind/streams/src/CallbackWrapper.php",
        "line": 96,
        "function": "stream_read",
        "class": "Icewind\\Streams\\Wrapper",
        "type": "->",
        "args": [
          8192
        ]
      },
      {
        "function": "stream_read",
        "class": "Icewind\\Streams\\CallbackWrapper",
        "type": "->",
        "args": [
          8192
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Storage/Local.php",
        "line": 296,
        "function": "file_put_contents",
        "args": [
          "/var/www/html/data/skjnldsv/files/InstantUpload/2022/10/VID_20221016_155502000.mp4",
          null
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Storage/Local.php",
        "line": 587,
        "function": "file_put_contents",
        "class": "OC\\Files\\Storage\\Local",
        "type": "->",
        "args": [
          "files/InstantUpload/2022/10/VID_20221016_155502000.mp4",
          null
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php",
        "line": 647,
        "function": "writeStream",
        "class": "OC\\Files\\Storage\\Local",
        "type": "->",
        "args": [
          "files/InstantUpload/2022/10/VID_20221016_155502000.mp4",
          null,
          null
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php",
        "line": 647,
        "function": "writeStream",
        "class": "OC\\Files\\Storage\\Wrapper\\Wrapper",
        "type": "->",
        "args": [
          "files/InstantUpload/2022/10/VID_20221016_155502000.mp4",
          null,
          null
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
        "line": 248,
        "function": "writeStream",
        "class": "OC\\Files\\Storage\\Wrapper\\Wrapper",
        "type": "->",
        "args": [
          "files/InstantUpload/2022/10/VID_20221016_155502000.mp4",
          null
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
        "line": 164,
        "function": "put",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->",
        "args": [
          null
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 307,
        "function": "createFile",
        "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
        "type": "->",
        "args": [
          "VID_20221016_155502000.mp4",
          null
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 133,
        "function": "copyNode",
        "class": "Sabre\\DAV\\Tree",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\DAV\\Upload\\FutureFile"
          },
          {
            "__class__": "OCA\\DAV\\Connector\\Sabre\\Directory"
          },
          "VID_20221016_155502000.mp4"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 163,
        "function": "copy",
        "class": "Sabre\\DAV\\Tree",
        "type": "->",
        "args": [
          "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
          "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php",
        "line": 94,
        "function": "move",
        "class": "Sabre\\DAV\\Tree",
        "type": "->",
        "args": [
          "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
          "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
        ]
      },
      {
        "file": "/var/www/html/apps/dav/lib/Upload/ChunkingPlugin.php",
        "line": 76,
        "function": "performMove",
        "class": "OCA\\DAV\\Upload\\ChunkingPlugin",
        "type": "->",
        "args": [
          "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
          "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "beforeMove",
        "class": "OCA\\DAV\\Upload\\ChunkingPlugin",
        "type": "->",
        "args": [
          "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
          "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 603,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "beforeMove",
          [
            "uploads/skjnldsv/4890f3374f04a79f0603eae9af80f964/.file",
            "files/skjnldsv/InstantUpload/2022/10/VID_20221016_155502000.mp4"
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpMove",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          "method:MOVE",
          [
            {
              "__class__": "Sabre\\HTTP\\Request"
            },
            {
              "__class__": "Sabre\\HTTP\\Response"
            }
          ]
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 253,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": [
          {
            "__class__": "Sabre\\HTTP\\Request"
          },
          {
            "__class__": "Sabre\\HTTP\\Response"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 321,
        "function": "start",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/lib/Server.php",
        "line": 358,
        "function": "exec",
        "class": "Sabre\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
        "line": 35,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/remote.php",
        "line": 166,
        "args": [
          "/var/www/html/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/lib/private/Log/ErrorHandler.php",
    "Line": 92,
    "CustomMessage": "--"
  }
}

Related or ressources

@skjnldsv
Copy link
Member Author

skjnldsv commented Oct 16, 2022

Regarding the first error

could not get login credentials because the token is invalid: Token does not exist: token does not exist
I have full access to my instance on the app. The stored token is definitely NOT invalid.

Regarding this issue generally speaking

I agree that some issues might be coming from the server. BUT, before you close it, there is definitely some things to improve from the Android app too.

Uploading via web UI ALSO fails. It behaves the same way.
Note that the 403 returned includes dav data. Meaning the reverse proxy is not blocking the request. The Nextcloud instance is in fast responding with a forbidden response

@attie
Copy link

attie commented Oct 19, 2022

I'd agree that part of this needs to be resolved in the Android client (and posibly others too) - see nextcloud/server#23552 (comment)

Specifically, the uploads need to have a unique-to-the-upload identifier (e.g: UUIDv4), and not a unique-to-the-payload identifier (as is currently used).

@joshtrichards joshtrichards changed the title Instant upload randomly fails over and over Instant upload randomly fails over and over: maintenance mode, Permission error, etc. Nov 28, 2023
@joshtrichards joshtrichards added the connectivity DNS, TLS, proxies, network connection, etc. related matter label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing bug connectivity DNS, TLS, proxies, network connection, etc. related matter feature: auto upload
Projects
None yet
Development

No branches or pull requests

3 participants