Skip to content

Race condition with ReadableStream #52

@Manouchehri

Description

@Manouchehri

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions