Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition with ReadableStream #52

Open
Manouchehri opened this issue Feb 16, 2023 · 0 comments
Open

Race condition with ReadableStream #52

Manouchehri opened this issue Feb 16, 2023 · 0 comments

Comments

@Manouchehri
Copy link
Contributor

I gave up trying to troubleshoot this one (I just switched to using an ArrayBuffer, I didn't really need to use a stream), but sometimes (not always) I get a race condition where the ReadableStream body is read twice.

✘ [ERROR] Uncaught (in response) TypeError: This ReadableStream is disturbed (has already been read from), and cannot be used as a body.


✘ [ERROR] Uncaught (in promise) TypeError: This ReadableStream is disturbed (has already been read from), and cannot be used as a body.

  return new Request(signed.url.toString(), Object.assign({ duplex: 'half' }, signed))
         ^
      at sign

I don't know if 169db6f is related (my guess is not).

Mainly documenting this for others in the future.

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 a pull request may close this issue.

1 participant