(v.0.42) Error - Invariant Violation: Failed to respond request: the "request" event has already been responded to
See original GitHub issuePrerequisites
- I confirm my issue is not in the opened issues
- I confirm the Frequently Asked Questions didn’t contain the answer to my issue
Environment check
- I’m using the latest
msw
version - I’m using Node.js version 14 or higher
Node.js version
v16.15.0
Reproduction repository
https://github.com/7iomka/next-with-msw-and-effector
Reproduction steps
yarn add msw@latest yarn dev
Current behavior
error - Invariant Violation: Failed to respond to "GET http://localhost:3000/backend-api/xxxx" request: the "request" event has already been responded to.
at setupServerListener (************/node_modules/msw/lib/node/index.js:1249:17) {
Expected behavior
All works as in v0.38.0
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:25 (12 by maintainers)
Top Results From Across the Web
Service worker error: event already responded to
Uncaught (in promise) DOMException: Failed to execute 'respondWith' on 'FetchEvent': The event has already been responded to. I know that ...
Read more >NUREG/CR-1278, "Handbook of Human Reliability Analysis ...
assumes that all of the ANNs (or completely dependent sets of ANNs) are equal in terms of the probability of being noticed. See...
Read more >Competition between parallel sensorimotor learning systems
Sensorimotor learning is supported by at least two parallel systems: a strategic process that benefits from explicit knowledge and an implicit process that ......
Read more >DESCRIPTORS. examines qUestions and responses ... - ERIC
examines qUestions and responses ofchildren aged.8-16, and in particular, the role that curiosity and questions can play in learning.
Read more >Buying Intentions and Purchase Probability: I
Hence, the responses on a survey of buying intentions have behavioral ... if the cut-off probability were invariant, given the same proportion of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, my pleasure, @M3kH! I’m happy we were able to find a solution that’s not entirely hacky. HMR is tricky, and it depends on the module evaluation, so certain modules are “preserved” while certain are re-evaluated. Funny how moving a class instantiation into a different module affects how that class will behave when under hot reload. If anything, the hot reload itself feels magical (perhaps too magical?).
That being said, if you like my work and would like for MSW to grow and improve, please consider sponsoring the project on GitHub. Let’s build sustainable open source together, where features and bug fixes don’t cost maintainer’s personal lives and time.
I’m getting it with https://github.com/vercel/next.js/tree/canary/examples/with-msw just by upgrading dependency to
"msw": "^0.42.1",