Skip to content

PROPFIND returns HTTP 500 with empty body for some directories — client reports "response not in XML format #940

Closed

Description

@Cosmekaili-creator

Description:

When syncing a large folder (e.g. a Cryptomator vault) with the Open Cloud desktop client, sync repeatedly fails with:
"Le serveur a renvoyé une erreur lors de la lecture du répertoire « Vault/Shared Vault/d/… » : Erreur du serveur : La réponse PROPFIND n'est pas au format XML !"

OpenCloud version: 5.1.0 (docker image opencloudeu/opencloud-rolling:5.1.0)

Client: Open Cloud desktop (mirall)

Setup: Single user, Basic Auth for WebDAV. Nginx reverse proxy with long timeouts (7200s for /dav/). Container has 3 GB RAM.
Observed in server logs: For the failing PROPFIND requests, Reva returns HTTP 500 with 0 bytes body. The proxy logs "context canceled" and 502. So the client receives no valid WebDAV XML.

Pattern: The failing path changes each run (e.g. Vault/Shared Vault/d/BE, d/B7/…, d/AJ/…). Sync works on the first PC; a second PC syncing the same vault hits these errors repeatedly.

Expected: PROPFIND should either return 207 with valid multistatus XML, or 500 with an error body (not empty).

Activity

  1. i-Moony commented on Apr 27, 2026

    @i-Moony

    I would like to add that the issue still persists (6.1.0) and unlike other errors that sometimes occur this is not even present in .OpenCloudSync.log. From the logfile point of view syncrun just finishes like normal.

    #=#=#=# Syncrun started 2026-04-27T05:53:31Z
    #=#=#=# Syncrun finished 2026-04-27T05:58:38Z (last step: duration(0h, 5min, 6s, 672ms) , total: duration(0h, 5min, 6s, 672ms) ) 
    #=#=#=# Syncrun started 2026-04-27T06:08:47Z
    #=#=#=# Syncrun finished 2026-04-27T06:08:52Z (last step: duration(0h, 0min, 5s, 294ms) , total: duration(0h, 0min, 5s, 294ms) ) 
    #=#=#=# Syncrun started 2026-04-27T06:09:02Z
    #=#=#=# Syncrun finished 2026-04-27T06:09:10Z (last step: duration(0h, 0min, 7s, 325ms) , total: duration(0h, 0min, 7s, 325ms) ) 
    #=#=#=# Syncrun started 2026-04-27T06:09:16Z
    
  2. moved this from Qualification to Prio 2 in OpenCloud Team Boardon Apr 27, 2026
  3. hellboy-wien commented on Apr 27, 2026

    @hellboy-wien

    Environment:

    OpenCloud (ocis fork) - Edition: rolling

    Version: 6.0.0 (Compiled: 2026-03-31)

    Server OS: Debian 12 (Kernel 6.x)

    Docker Engine: v29.4.0 / Docker Compose: v5.1.3

    Reverse Proxy: OPNsense Nginx Plugin (Directly to Debian host)

    Client: Windows Desktop Client (mirall/3.0.3.2073)

    Description:
    I am encountering a persistent PROPFIND response is not in XML format error during synchronization. The error specifically triggers on deep folder structures. The sync process runs for about 8–10 seconds before aborting.

    Strange Behavior observed:
    While smaller folders seem to sync without the XML error, they do not appear in the "Personal" (Persönlich) directory in the web UI or client. The folder remains empty, except for some internal .db files. It seems the file tree is not being rendered or traversed correctly.

    Important Note: * This issue occurs in a local LAN connection as well as over WireGuard. This rules out MTU or mobile network specifics.

    I am not using an additional internal proxy like Traefik (although the directory exists, it is not in the active chain).

    The traffic goes directly: Client -> OPNsense Nginx -> OpenCloud Container.

    Server Logs (opencloud-proxy):
    The logs show a context canceled error resulting in a 502 Bad Gateway when the deep structure is accessed:

    Plaintext
    2026-04-27T07:04:37Z ERR error happened in MultiHostReverseProxy error="context canceled" method=PROPFIND path="/dav/spaces/[SPACE-ID]/.../4 Profibus und Profinet/Kapitel 1 - Profinet/1.10 - Fehlersuche" proto=HTTP/1.1 remoteAddr=10.10.10.6 status=502
    2026-04-27T07:04:37Z ERR propfindResponse: couldn't list public shares error="rpc error: code = Canceled desc = context canceled" path="/.../1.10 - Fehlersuche" service=frontend
    2026-04-27T07:04:37Z ERR error listing shares: rpc error: code = Canceled desc = context canceled code=Canceled service=gateway uri=/cs3.gateway.v1beta1.GatewayAPI/ListPublicShares
    Additional Observations:

    Nginx buffers on OPNsense have been increased (large_client_header_buffers 4 64k, proxy_buffers 16 256k), but the issue persists.

    The context canceled after ~10 seconds suggests a timeout or a crash in the metadata/listing service when a certain depth or number of files is reached.

    I would appreciate any insights on why the "Personal" space is not showing content and why deep PROPFIND requests are being canceled.

  4. micbar commented on Apr 27, 2026

    @micbar
    Member

    That is a good log catch!

    Seems that the public share Manager times out.

  5. Cosmekaili-creator commented on Apr 27, 2026

    @Cosmekaili-creator
    Author

    I have precise informations about the origin of the bug I report and the ways to fix it, as I fixed it for myself on a system level :

    Sync fails with "PROPFIND Reply is not XML Formatted" when server sends HTTP/2 GOAWAY mid-discovery

    Environment

    • OpenCloud Desktop: 3.0.3.2073 (commit 72fe8fb)
    • Distribution: AppImage OpenCloud_Desktop-v3.0.3-linux-gcc-x86_64.AppImage
    • Bundled libraries: Qt 6.9.2, OpenSSL 3.5.4 (30 Sep 2025)
    • OS: EndeavourOS, kernel 6.19.14-arch1-1, x86_64
    • QPA: wayland
    • Server: OpenCloud 6.1.0 behind nginx (HTTP/2 enabled)

    Summary

    When a sync folder contains a large number of small files (in this case a Cryptomator vault stored on OpenCloud, ~5000+ tiny .c9r directory entries), the discovery phase fires PROPFINDs at a rate that exceeds nginx's default keepalive_requests 1000 per HTTP/2 connection. The server then sends a GOAWAY frame and terminates all in-flight streams. The desktop client surfaces the resulting truncated response bodies as:

    "Le serveur a renvoyé une erreur lors de la lecture du répertoire « ... » : Erreur du serveur : La réponse PROPFIND n'est pas au format XML !"
    (English: "PROPFIND Reply is not XML Formatted")
    

    The sync then aborts. On retry, the same thing happens at roughly the same point. The error is not actually about XML - it is the client reporting truncated stream bodies that the WebDAV parser cannot make sense of.

    The Qt log clearly shows the GOAWAY:

    [ warning qt.network.http2 ]: stream 2001 error: "Received GOAWAY"
    [ warning qt.network.http2 ]: stream 2001 finished with error: ""
    [ warning qt.network.http2 ]: stream 2003 error: "Received GOAWAY"
    ... (16 streams, IDs 2001-2031, all terminated at the same instant)
    

    Stream ID 2001 corresponds to the 1001st request on that connection, exactly matching nginx's default keepalive_requests 1000.

    Steps to reproduce

    1. Provision an OpenCloud server behind a stock nginx reverse proxy (default keepalive_requests 1000) with HTTP/2 enabled.
    2. Place a Cryptomator vault on the server containing several thousand encrypted entries (a few-GB vault is enough - Cryptomator generates one .c9r directory per encrypted file).
    3. Add the parent folder as a sync target on a fresh Linux install of the OpenCloud AppImage 3.0.3.
    4. Start sync and observe the discovery phase fail with "PROPFIND Reply is not XML Formatted" once roughly 1000 PROPFINDs have been issued on the same HTTP/2 connection.

    The same vault syncs without issue on:

    • Windows native client
    • Fedora native client
    • macOS client
    • Android client

    So the underlying issue manifests on this Linux AppImage build only - though the root cause (GOAWAY handling) is protocol-level and could in principle affect any build.

    Expected behavior

    When the server sends a GOAWAY frame (a normal, spec-defined HTTP/2 mechanism for the server to say "I'm closing this connection, please reconnect"), the client should:

    1. Stop opening new streams on the affected connection.
    2. Allow streams with ID <= last-stream-id from the GOAWAY to complete.
    3. Open a new HTTP/2 connection and re-issue any aborted streams.

    This is RFC 7540 §6.8 / RFC 9113 §6.8 behavior. Many small-file sync workloads will inevitably hit a server's per-connection request cap, regardless of the cap's value, so graceful GOAWAY recovery is essential for reliable WebDAV sync.

    Actual behavior

    Qt 6.9.2's HTTP/2 stack does steps 1 and 2 but appears to skip step 3. The aborted streams' partial bodies are bubbled up to the WebDAV layer, which then reports them as malformed XML. The OpenCloud sync engine treats this as a fatal directory-read error and aborts the sync run. No automatic retry on a fresh connection occurs.

    Workaround

    On the server side, raising nginx's keepalive_requests from the default 1000 to a high value (e.g. 100000) eliminates the GOAWAY for typical sync sessions and the vault syncs cleanly:

    server {
        listen 443 ssl;
        ...
        keepalive_requests 100000;
        ...
    }
    

    This is purely a workaround. The underlying client behavior - silently dropping aborted-stream bodies onto the WebDAV parser instead of reissuing on a new connection - remains.

    Suggested fix

    Either:

    a) Pin or patch the bundled Qt to a version where QHttp2Connection reissues streams aborted by GOAWAY transparently. (If such a Qt version does not yet exist, this likely needs a fix in QtNetwork itself.)

    b) Detect QNetworkReply::ProtocolFailure / truncated-body conditions in the OpenCloud client's OCC::PropfindJob and retry the request once on a fresh connection before surfacing the failure to the sync engine.

    (b) is probably the more practical fix and would also paper over similar transient HTTP/2 issues from other sources (e.g. proxy idle timeouts, server graceful restarts).

    Log evidence

    Relevant excerpts from a session run with --logdebug --logflush:

    26-04-27 03:06:33:881 [ info sync.engine ]: Server "6.1.0" Using HTTP/2
    
    (~1000 PROPFINDs over the next 22 seconds, the bulk of them targeting
     /dav/spaces/<space>/Vault/Shared Vault/d/AP/...c9r and similar)
    
    26-04-27 03:06:55:514 [ warning qt.network.http2 ]: stream 2001 error: "Received GOAWAY"
    26-04-27 03:06:55:515 [ warning qt.network.http2 ]: stream 2001 finished with error: ""
    26-04-27 03:06:55:515 [ warning qt.network.http2 ]: stream 2003 error: "Received GOAWAY"
    26-04-27 03:06:55:515 [ warning qt.network.http2 ]: stream 2003 finished with error: ""
    ... (16 streams, IDs 2001-2031, all at 03:06:55.514-515)
    
    [ warning sync.credentials.http ]: Invalidating the credentials
    [ info sync.account ]: Clearing cookies
    [ info gui.account.state ]: AccountState state change: Connected -> SignedOut
    [ warning gui.folder ]: SyncEngine finished with ERROR
    

    (The "Invalidating the credentials" / signout that follows the GOAWAY is, I think, a
    secondary symptom - the truncated 401-looking response on one of the aborted streams
    trips the credentials-invalid path. After re-OAuth the cycle repeats. This may or may
    not be worth a separate issue depending on how OCC::HttpCredentials::slotAuthentication
    distinguishes "real 401" from "stream cut off mid-response".)

    Side note: log file encoding

    When running with --logdebug on this system (locale fr_Latn_FR), the log file is a
    mix of UTF-8 and UTF-16LE - the same line types switch encoding partway through the
    file. This made grep initially return nothing for obvious patterns like propfind.
    Reproducer: file /tmp/oc.log reports differing encodings depending on the byte offset.
    Possibly a Qt logging issue rather than an OpenCloud one, but worth flagging.

  6. micbar commented on Apr 27, 2026

    @micbar
    Member

    What about downgrading the http connection to 1.1 and not support http 2?

  7. Cosmekaili-creator commented on Apr 27, 2026

    @Cosmekaili-creator
    Author

    What about downgrading the http connection to 1.1 and not support http 2?

    You can always tweak the system, but the code needs a proper patching. The Open cloud client isn't behaving into the norms.

  8. micbar commented on Apr 28, 2026

    @micbar
    Member

    This might be a duplicate of #734

  9. hellboy-wien commented on Apr 28, 2026

    @hellboy-wien

    No more PROPFIND errors with these Nginx settings:

    proxy_read_timeout 3600s;
    proxy_send_timeout 3600s;
    keepalive_requests 100000;
    keepalive_timeout 5m;
    http2_max_concurrent_streams 512;
    

    However, when syncing large folder structures the client still aborts after exactly 5 minutes and restarts the sync from the beginning.

    I suspect the keepalive_timeout 5m is the culprit — it matches the exact abort interval. Tried increasing it but not fully resolved yet.

    Partial fix for the token expiry issue: The default IDP token expiration is only 300 seconds (5 minutes). Add these to your docker-compose.yml environment section:

    IDP_ACCESS_TOKEN_EXPIRATION=2592000
    IDP_ID_TOKEN_EXPIRATION=2592000
    

    Note: These variables must be explicitly referenced in docker-compose.yml, not just in .env!

    Workaround for large migrations via rsync: move data in smaller batches into the PosixFS user directory and sync batch by batch. PosixFS detects changes automatically via inotify — no container restart needed between batches.

    Still investigating the root cause of the 5min abort. Any ideas?

  10. micbar commented on Apr 28, 2026

    @micbar
    Member

    This is clearly a bug in the QT framework which needs a code fix and a new desktop client release.

  11. i-Moony commented on Apr 29, 2026

    @i-Moony

    I can confirm that in my case it ALSO was an NGINX misconfiguration. I did not read thoroughly through the docs.

  12. dragonchaser commented on May 21, 2026

    @dragonchaser
    Member

    @micbar should we move this to the desktop repo then?

  13. guruz commented on May 28, 2026

    @guruz
    Contributor

    [ warning qt.network.http2 ]: stream 2001 error: "Received GOAWAY"

    This might be a duplicate of #734

    Issues related to this are indeed (unfortunately) caused by Qt version and we're currently not working around it in the Qt based desktop client (iOS and Android are different codebase).

    See my comment here, it would be nice to get more data with a newer Qt version: #734 (comment)

    What about downgrading the http connection to 1.1 and not support http 2?

    For people needing a quick workaround, it would be best to disable http2 based on user agent until all clients are updated.

  14. tbsbdr commented on Jun 10, 2026

    @tbsbdr
    Member

    will be kept as known issue for the next prod release

  15. github-actions commented on Jul 11, 2026

    @github-actions

    This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days.

  16. added this to the Backlog milestone on Aug 4, 2026
  17. guruz commented on Aug 4, 2026

    @guruz
    Contributor

    This is clearly a bug in the QT framework which needs a code fix and a new desktop client release.

    #734 (comment)

  18. linked a pull request that will close this issueDisable HTTP/2 support again #1010on Aug 5, 2026
  19. lucianomunoz commented on Aug 9, 2026

    @lucianomunoz

    Are we getting a fix, im having the same issue and because of that i cant sync my pc at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions