server icon indicating copy to clipboard operation
server copied to clipboard

Sabre\DAV\Exception: Unknown error while seeking content ----- Sync pending perpetually

Open YosypC opened this issue 3 years ago • 14 comments

Linking my main post on the forum, containing most, if not all necessary information.

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Enabled:
  - cloud_federation_api: 1.6.0
  - dashboard: 7.3.0
  - dav: 1.21.0
  - federatedfilesharing: 1.13.0
  - files: 1.18.0
  - files_rightclick: 1.2.0
  - logreader: 2.8.0
  - lookup_server_connector: 1.11.0
  - oauth2: 1.11.0
  - provisioning_api: 1.13.0
  - settings: 1.5.0
  - twofactor_backupcodes: 1.12.0
  - viewer: 1.7.0
  - workflowengine: 2.5.0
Disabled:
  - accessibility
  - activity
  - admin_audit
  - bruteforcesettings
  - calendar
  - circles
  - comments
  - contacts
  - contactsinteraction
  - encryption
  - federation
  - files_external
  - files_pdfviewer
  - files_sharing
  - files_trashbin
  - files_versions
  - files_videoplayer
  - firstrunwizard
  - mail
  - nextcloud_announcements
  - notifications
  - password_policy
  - photos
  - privacy
  - recommendations
  - richdocuments
  - serverinfo
  - sharebymail
  - spreed
  - support
  - survey_client
  - systemtags
  - text
  - theming
  - updatenotification
  - user_ldap
  - user_status
  - weather_status

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.200.104",
            "xxx.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "23.0.0.10",
        "overwrite.cli.url": "https:\/\/xxx.org\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "memcache.local": "\\OC\\Memcache\\APCu"
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: I don't know what it is, so probably not.

EDIT: there they are a lot of people with my same problem. https://help.nextcloud.com/t/sabre-dav-exception-unknown-error-while-seeking-content/128572/5

YosypC avatar Jan 12 '22 12:01 YosypC

Downgrading to 3.3.6 fixed the issue. I'm realizing there's lots of people having problems with the latest versions.

YosypC avatar Jan 13 '22 16:01 YosypC

I have been having the same issue for the last month, since I upgraded to NC25. I am referencing the issue I opened on nextcloud help here. I posted logs from the server and the client. If it helps.

The above solution suggested by @YosypC solved the issue for me for now. If there is a better solution I'm happy to try.

ozankiratli avatar Nov 16 '22 22:11 ozankiratli

Same issue happening to me since the upgrade to 25. The desktop client is completely unresponsive and spins one core at 100%.

The nextcloud error log produces the following output in the process:

{
  "reqId":"Y3pIdxoRRdu92Hg4N4cABAAAAK0",
  "level":3,
  "time":"2022-11-20T15:32:17+00:00",
  "remoteAddr":"my_ip",
  "user":"me",
  "app":"webdav",
  "method":"POST",
  "url":"/remote.php/dav/bulk",
  "message":"Unknown error while seeking content",
  "userAgent":"Mozilla/5.0 (Windows) mirall/3.4.1stable-Win64 (build 20211221) (Nextcloud, windows-10.0.22623 ClientArchitecture: x86_64 OsArchitecture: x86_64)",
  "version":"25.0.1.1",
  "exception":{
    "Exception":"Sabre\\DAV\\Exception",
    "Message":"Unknown error while seeking content",
    "Code":500,
    "Trace":[
      {
        "file":"/var/www/nextcloud/htdocs/apps/dav/lib/BulkUpload/MultipartRequestParser.php",
        "line":129,
        "function":"isAt",
        "class":"OCA\\DAV\\BulkUpload\\MultipartRequestParser",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/htdocs/apps/dav/lib/BulkUpload/BulkUploadPlugin.php",
        "line":71,
        "function":"isAtLastBoundary",
        "class":"OCA\\DAV\\BulkUpload\\MultipartRequestParser",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/htdocs/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line":89,
        "function":"httpPost",
        "class":"OCA\\DAV\\BulkUpload\\BulkUploadPlugin",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line":472,
        "function":"emit",
        "class":"Sabre\\DAV\\Server",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line":253,
        "function":"invokeMethod",
        "class":"Sabre\\DAV\\Server",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line":321,
        "function":"start",
        "class":"Sabre\\DAV\\Server",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/htdocs/apps/dav/lib/Server.php",
        "line":360,
        "function":"exec",
        "class":"Sabre\\DAV\\Server",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/htdocs/apps/dav/appinfo/v2/remote.php",
        "line":35,
        "function":"exec",
        "class":"OCA\\DAV\\Server",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/htdocs/remote.php",
        "line":171,
        "args":[
          "/var/www/nextcloud/htdocs/apps/dav/appinfo/v2/remote.php"
        ],
        "function":"require_once"
      }
    ],
    "File":"/var/www/nextcloud/htdocs/apps/dav/lib/BulkUpload/MultipartRequestParser.php",
    "Line":111,
    "message":"Unknown error while seeking content",
    "exception":{
      
    },
    "CustomMessage":"Unknown error while seeking content"
  }
}

BtbN avatar Nov 20 '22 15:11 BtbN

Looking a bit more into this, the issue happens in https://github.com/nextcloud/server/blob/9b86b91ddf9d6469fe7b5281b86d413e8432b1e3/apps/dav/lib/BulkUpload/MultipartRequestParser.php#L101

fread for some reason hits EOF or something, and returns less data than was requested. In turn the following fseek fails, cause it can't seek back the full requested length. Not exactly understanding what that code is supposed to do. Or how it failing to parse an upload somehow ends up with the Desktop Client getting completely locked up...

BtbN avatar Nov 20 '22 16:11 BtbN

I have managed to resolve my specific case by looking at the local client log, which revealed to me which file it was getting stuck on. I then manually uploaded the up to date file from my local PC via the WebUI, issued an occ files:scan --all for good measure, and now the client is working fine again. Even updating the affected file locally for a test synced as expected again. Not sure what got it into that broken state.

BtbN avatar Nov 20 '22 16:11 BtbN

I am referencing the issue I opened on nextcloud help here.

@BtbN Check the issue I created on nextcloud help too, in the edits I put some possible solutions that I found. The issue is apparently not the server but the client . There is an open issue under nextcloud/desktop (See here).

ozankiratli avatar Nov 20 '22 19:11 ozankiratli

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

szaimen avatar Jan 23 '23 12:01 szaimen

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

I'm running 25.0.4 and see hundreds of these errors in the logs (Are these related to the same error above?).

[webdav] Error: Sabre\DAV\Exception: Unknown error while seeking content at <>

0. /var/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php line 129
   OCA\DAV\BulkUpload\MultipartRequestParser->isAt()
1. /var/www/nextcloud/apps/dav/lib/BulkUpload/BulkUploadPlugin.php line 71
   OCA\DAV\BulkUpload\MultipartRequestParser->isAtLastBoundary()
2. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
   OCA\DAV\BulkUpload\BulkUploadPlugin->httpPost()
3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
   Sabre\DAV\Server->emit()
4. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
   Sabre\DAV\Server->invokeMethod()
5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
   Sabre\DAV\Server->start()
6. /var/www/nextcloud/apps/dav/lib/Server.php line 360
   Sabre\DAV\Server->exec()
7. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
8. /var/www/nextcloud/remote.php line 171
   require_once("/var/www/nextcl ... p")

POST /remote.php/dav/bulk
from XX.XXX.XXX.XXX by XXX at 2023-02-28T02:11:57+00:00

RJ-Make avatar Feb 28 '23 10:02 RJ-Make

Seeing this error on Nc 25.0.5

{"reqId":"IFUIpJbZfWGtf4zKGrKo","level":3,"time":"2023-03-29T16:12:39+00:00","remoteAddr":"10.0.10.90","user":"IT","app":"webdav","method":"POST","url":"/remote.php/dav/bulk","message":"Unknown error while seeking content","userAgent":"Mozilla/5.0 (Windows) mirall/3.7.4stable-Win64 (build 20230309) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.5.1","exception":{"Exception":"Sabre\\DAV\\Exception","Message":"Unknown error while seeking content","Code":500,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php","line":129,"function":"isAt","class":"OCA\\DAV\\BulkUpload\\MultipartRequestParser","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/BulkUpload/BulkUploadPlugin.php","line":71,"function":"isAtLastBoundary","class":"OCA\\DAV\\BulkUpload\\MultipartRequestParser","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPost","class":"OCA\\DAV\\BulkUpload\\BulkUploadPlugin","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":360,"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":171,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php","Line":111,"message":"Unknown error while seeking content","exception":[],"CustomMessage":"Unknown error while seeking content"},"id":"64247d1b0c6be"}

AndyXheli avatar Mar 29 '23 18:03 AndyXheli

the error occurs also under NC 26.0.0 with this content

[webdav] Fehler: Sabre\DAV\Exception: Unknown error while seeking content at <<closure>>

0. /var/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php line 129
   OCA\DAV\BulkUpload\MultipartRequestParser->isAt()
1. /var/www/nextcloud/apps/dav/lib/BulkUpload/BulkUploadPlugin.php line 71
   OCA\DAV\BulkUpload\MultipartRequestParser->isAtLastBoundary()
2. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
   OCA\DAV\BulkUpload\BulkUploadPlugin->httpPost()
3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
   Sabre\DAV\Server->emit()
4. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
   Sabre\DAV\Server->invokeMethod()
5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
   Sabre\DAV\Server->start()
6. /var/www/nextcloud/apps/dav/lib/Server.php line 366
   Sabre\DAV\Server->exec()
7. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
8. /var/www/nextcloud/remote.php line 171
   require_once("/var/www/nextcl ... p")

POST /remote.php/dav/bulk
from lokalIP by username at 2023-04-05T10:08:06+02:00

chrissi55 avatar Apr 05 '23 15:04 chrissi55

I have the same issue.

UPD: Just updated to 26.0.0, windows client is 3.7.4. The issue stil remains but ONLY for empty files, eg. empty.txt with 0 KB. If I create empty.txt with not null text, everything is working! The file does appear in web interface with size < 1KB. Looks like this issue is not about client...

antonwantstosleep avatar Apr 06 '23 11:04 antonwantstosleep

For the moment i set the following option to ../nextcloud/config/config.php

'bulkupload.enabled' => false,

My log seems to calm since 2 days ... don't know if this helps others but as workaround give it a try

chrissi55 avatar Apr 19 '23 10:04 chrissi55

Truenas server install. Ubuntu Linux clients. Clients have "too many open files" error. Server has many subject error messages in the log. @chrissi55 solution makes syncing work again.

cas206 avatar Jun 04 '23 18:06 cas206

Same issue on NC 26.0.2 @szaimen can you please update the feedback to refect NC 26?

https://github.com/nextcloud/desktop/issues/5758

{"reqId":"QhrIeOcaKp65EW8jIHFl","level":3,"time":"2023-06-20T14:16:24-05:00","remoteAddr":"X.X.X.X,"user":"username","app":"webdav","method":"POST","url":"/remote.php/dav/bulk","message":"Unknown error while seeking content","userAgent":"Mozilla/5.0 (Windows) mirall/3.8.0stable-Win64 (build 20230331) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"26.0.2.1","exception":{"Exception":"Sabre\\DAV\\Exception","Message":"Unknown error while seeking content","Code":500,"Trace":[{"file":"/var/www/nextcloud/apps/dav/lib/BulkUpload/MultipartRequestParser.php","line":129,"function":"isAt","class":"OCA\\DAV\\BulkUpload\\MultipartRequestParser","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/BulkUpload/BulkUploadPlugin.php","line":71,"function":"isAtLastBoundary","class":"OCA\\DAV\\BulkUpload\\MultipartRequestParser","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPost","class":"OCA\\DAV\\BulkUpload\\BulkUploadPlugin","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":366,"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/BulkUpload/MultipartRequestParser.php","Line":111,"message":"Unknown error while seeking content","exception":[],"CustomMessage":"Unknown error while seeking content"},"id":"6491fbbfcb221"}

AndyXheli avatar Jun 20 '23 19:06 AndyXheli

Not funny any more, non of my clients are syncing data, only download it and logs full of this error with NC 25.0.8

GAS85 avatar Jun 26 '23 15:06 GAS85

Same issue on NC 27.0.0

AndyXheli avatar Jun 26 '23 16:06 AndyXheli

Duplicate of #30424 Consolidate tracking/progress there. Subscribe and/or give that issue a :+1: if impacted.

joshtrichards avatar Aug 28 '23 20:08 joshtrichards