Android unable to connect to WebDAV

I believe there is a known fragility with android devices syncing with WebDAV as I have found several other posts and checked the things mentioned in those.
- (not) digest
- credentials are the same on my android and computer WebDAV settings in zotero

Debug ID is D345328406

What works:
- WebDAV setup with CPanel Web Disk cPanel Web Disk, https://jbadham.biz:2078
- works with two different computers, i sync between home and work fine
- Generic android WebDAV client (Solid Explorer) is able to access the files in the zotero folder using the same credentials

What doesn't work:
- Android tablet (Samsung Galaxy Tab A9, Android 16)
- Zotero android app version 1.0.0-247
The error message is "Could not connect to WebDAV server"

I have tried with both the wifi network (that the home computer uses successfully) and my phone as hotspot. I also uninstalled/reinstalled zotero.

Any other ideas?

Thank you
  • (+0000009): [DEBUG] --> DELETE https://[…]:2078/zotero/zotero-test-file.prop

    (+0000001): [DEBUG] Authorization: redacted

    (+0000002): [DEBUG] User-Agent: Zotero/1.0.0-247 (Android 36)

    (+0000000): [DEBUG] --> END DELETE

    (+0001591): [DEBUG] <-- HTTP FAILED: java.net.ProtocolException: HTTP 204 had non-zero Content-Length: 20
    The server is broken. It's returning content for a 204 No Content response. From that page:

    "Note that the response must not include any content or the Content-Length header (browsers may reject responses that include content)."
  • Then why does it work fine for my computer? I have no trouble syncing on that
  • See what I quoted. HTTP clients could choose to ignore this, but it's a malformed response, and clients can reject it. The HTTP library we use in the Android app does.
  • Okay. Thank you for your help, I will see if I can work out if there's any settings to fix that
  • I have followed up with my web host service and they are having difficulty reproducing the error.

    They have stated:
    - we need the exact HTTP request/response details from Zotero, including the request headers and the complete response headers/body, or a command-line test that reliably produces the reported response.
    - Alternatively, a documented sequence of WebDAV requests that reliably reproduces the issue (for example, a curl command or equivalent)

    Since you have stated that the specific HTTP library is relevant, could I please also get the name of that library.
  • Sorry, we can't help with that. We don't have access to your server, and the app doesn't log full request/response headers. They can see in the debug output I quoted above that the app is getting a Content-Length: 20 for a 204. They should be able to check their logs to find that DELETE request and see the response size and then try to figure out why it's happening.

    The library is OkHttp.
Sign In or Register to comment.