Skip to content

Conversation

rina-rgb
Copy link
Collaborator

Fix “body stream already read” & Playground stall after switching to jsDelivr.

Why it appeared after switching CDNs:

  • unpkg often didn’t send Content-Length, so strict byte check never ran.
  • jsDelivr sends a compressed response with Content-Length. Our progress counts decoded bytes, which don’t match the compressed length, so the fallback tried to read the same Response twice.
  • In dev, React StrictMode double-invocation makes this more likely to surface. In prod, it stalls the Playground around 90–98%.
  • Fix: read the fallback from a cloned Response.

@netlify
Copy link

netlify bot commented Aug 16, 2025

Deploy Preview for ffmpegwasm canceled.

Name Link
🔨 Latest commit dee8f4c
🔍 Latest deploy log https://app.netlify.com/projects/ffmpegwasm/deploys/68a03bec31c11e0007bf89f9

@rina-rgb rina-rgb marked this pull request as ready for review August 16, 2025 08:12
@rina-rgb rina-rgb merged commit 158e59f into ffmpegwasm:main Aug 16, 2025
6 of 7 checks passed
@rina-rgb rina-rgb deleted the fix/progress-clean branch August 16, 2025 08:39
@lucasgelfond
Copy link
Collaborator

amazing ty for catching!!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants