#2820·hydra

Steam sync always fails with 504 at snapshot/commit (Cloudflare origin timeout); run left stuck in PENDING with no error in the UI

Author: marioporfirioCreated Sep 18, 2026Updated Sep 18, 2026

Description

Steam library sync never completes. The snapshot chunks upload fine, but the final snapshot/commit call times out after exactly 30 seconds and returns a Cloudflare 504. Nothing is shown in the UI — the app silently returns to offering "sync" again, so from the user's perspective the sync just stops halfway and asks to be repeated.

lastSyncedAt has never advanced from null.

Steps to reproduce

  1. Connect a Steam account (connected: true, connection is valid — this is not a stale session).
  2. Trigger a manual library sync.
  3. Chunks upload successfully, commit fails.

Actual behaviour

Request sequence of one attempt (local time, UTC-3):

21:05:22  PUT  /profile/integrations/steam/sync/{id}/snapshot/chunks/0  -> 204  (2s)
21:05:24  PUT  /profile/integrations/steam/sync/{id}/snapshot/chunks/1  -> 204  (1s)
21:05:25  POST /profile/integrations/steam/sync/{id}/snapshot/commit    -> 504  (after exactly 30s)

The 504 body is a Cloudflare error page, i.e. the origin server did not respond in time:

cloudflare_error: true,
retryable: true,
retry_after: 120,
owner_action_required: true,
what_you_should_do: '**Wait and retry.** Back off for at least 120 seconds. If the error
  persists, the website operator should investigate long-running processes on the origin server.'

API host: hydra-api-us-east-1.losbroxas.org

Three secondary problems that follow from it

  1. The run is left stuck in PENDING server-side, and never starts:
latestSyncRun: {
  id: 'cdff8318-93b1-4ae9-abe9-d43836aaa12b',
  trigger: 'MANUAL',
  status: 'PENDING',
  gamesFound: 0,
  gamesUpserted: 0,
  achievementsUnlocked: 0,
  error: null,
  startedAt: null,
  completedAt: null,
  createdAt: '2026-09-17T23:54:56.631Z'
}
  1. The automatic cleanup also fails. The client tries DELETE /profile/integrations/steam/sync/{id} to cancel the pending run, and that request times out with 504 as well:
[21:06:25.857] [error] (steam-sync) Failed to cancel pending run cdff8318-93b1-4ae9-abe9-d43836aaa12b
  at async SteamSyncOrchestrator.cancelPendingRun (out/main/index.js:39838:13)
  at async SteamSyncOrchestrator.run (out/main/index.js:40184:17)
  1. snapshotPreserved: false on every subsequent GET /profile/integrations/steam, so each retry re-uploads from scratch. This seems to defeat the intent of #2789 ("fix(steam): preserve partial sync data") when the failure happens at commit time.

Expected behaviour

  • The commit step should not exceed the gateway timeout (chunked/async processing, or a job queue with polling).
  • A failed commit should surface an error in the UI instead of silently resetting to "sync again".
  • A run that never started should not remain PENDING, and cancellation should not depend on the same timing-out endpoint.

Occurrences

Four consecutive failures, all on 2026-09-17 (UTC-3), all identical:

20:23:32  504
21:05:55  504
21:09:54  504
21:24:47  504

Run IDs involved: e4b0f4d5-f039-4757-a3bc-eb11242c6271, cdff8318-93b1-4ae9-abe9-d43836aaa12b, 977be887-66f3-4234-aaa0-5d8a31dcf34a.

Note: POST /profile/integrations/steam/sync itself succeeds (202 with a new syncRunId) — only the commit step fails.

Environment

  • Hydra 4.1.4 (Linux, installed from the AUR package hydra-launcher-bin)
  • Arch Linux, Wayland (Hyprland)
  • Chromium/Electron 153.0.8010.36
  • API region: us-east-1
  • Reproduced with two different DNS resolvers (Cloudflare 1.1.1.1 and the ISP's via DHCP), which rules out client-side name resolution.