Avoid Safari/WebKit stalls during chunked ROM uploads#3382
Conversation
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/41c15553-6e97-45ca-be3d-589c2f07589e Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
|
@copilot can you confirm webkit is the issue here? |
Not definitively. What I can confirm is that the failing path is browser-engine-specific: same server/upload flow works in Chromium, fails in Safari/WebKit, and the only client-side behavior I changed is Safari’s Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Works around a Safari/WebKit-specific stall observed during chunked ROM uploads by skipping axios's onUploadProgress callback on WebKit browsers, while preserving forward progress updates by emitting a per-chunk completion update.
Changes:
- Add
shouldTrackChunkUploadProgress()that returns false for WebKit user agents that are not Chromium-based. - Conditionally attach
onUploadProgressto the chunkPUTrequest based on the above check. - Always emit a chunk-completion progress update after each successful
PUT.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
Chunked ROM uploads could stall after the first few
PUT /api/roms/upload/{id}requests in Safari/WebKit, while the same flow completed normally in Chromium-based browsers. The issue was isolated to the frontend upload path rather than the server-side chunk assembly flow.Chunked upload behavior
axiosonUploadProgressfor those browsers, which avoids the WebKit-specific upload stall point.Progress reporting
Scope
frontend/src/services/api/rom.ts.