-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
TypeError: Cannot set property headers of #<_Request> which has only a getter #2290
Comments
@stevensacks, can you please point me to what exact request handler you expect to be called? |
I believe I tracked down the issue. Opened a fix at mswjs/interceptors#640. Will propagate to MSW soon. I'd love to know more details on the expected result. The error is not thrown anymore in your code, but nothing happens on the page. I can see the 302 response arriving as |
That is odd. Login was working before with the msw handler (inside the test folder) as written. I’ll look into it asap. |
Seems to be a bug in remix-auth. It's not storing the session correctly. Login succeeds From the user side, it appears to never leave the login page. |
We did release some fixes around redirects in MSW, but those are suppose to follow redirects correctly (that was never done before). They are also relevant to fetch only. In your case, you are using I believe the underlying issue is fixed. We didn't cover one |
The reason it wasn't redirecting to /profile after login was a mistake in my code. remix-auth's authenticator throws a redirect on success, but my try catch around it was handling it as if it was an error instead of rethrowing it. It's working now in 2.4.8. |
Awesome! 🎉 Good job on figuring that out. Meanwhile, the fix is about ready. Will publish today. |
Released: v2.4.9 🎉This has been released in v2.4.9! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
I'm still having the error To reproduce, just clone the repo, check the branch |
Prerequisites
Environment check
msw
versionNode.js version
20.17.0
Reproduction repository
https://github.com/gaia-react/remix
Reproduction steps
npx create-remix@latest --template gaia-react/remix
npm install msw@2.4.8
(it's currently using 2.4.2 which is the last working version)npm run dev
to launch Remix serverpassw0rd
(zero for o) and click the Login buttonCurrent behavior
I'm using remix-auth to make the call to the login endpoint, but it doesn't make it to the defined MSW handler.
If you need the console log of the error to show up in the terminal process, add it here after line 21.
Expected behavior
Expect the API call to go through to the MSW handler, as it does in version 2.4.2.
The text was updated successfully, but these errors were encountered: