Skip to content
New issue

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

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

Already on GitHub? # to your account

XHR is broken in 0.34.3 #630

Closed
robbtraister opened this issue Sep 9, 2024 · 4 comments · Fixed by #632
Closed

XHR is broken in 0.34.3 #630

robbtraister opened this issue Sep 9, 2024 · 4 comments · Fixed by #632

Comments

@robbtraister
Copy link
Contributor

It seems that a regression was introduced into the XMLHttpRequestController in the 0.34.3 release.

I have not yet been able to identify the root cause, but here is a codesandbox showing a test passing with window.fetch() and failing with axios.put(). The XHR request simply never returns and results in a timeout.

@robbtraister
Copy link
Contributor Author

I first noticed this today because msw@2.4.4 was just released with a dependency bump to @mswjs/interceptors@0.35.0 from 0.29.0. I can still correctly use msw@2.4.4 by pinning to @mswjs/interceptors@0.34.2 (or prior)

@robbtraister
Copy link
Contributor Author

robbtraister commented Sep 9, 2024

It looks like the request body has already been read/locked before we attempt to clone it (in order to determine content-length), where it is no longer cloneable.

@ddolcimascolo
Copy link

Hi all, posting here from mswjs/msw#2273.

Anything I can do to help?

Thx,
David

@kettanaito
Copy link
Member

Released: v0.35.3 🎉

This has been released in v0.35.3!

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants