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

Symbol(nodeStream) error message with msw #1325

Closed
antham opened this issue Mar 18, 2024 · 2 comments · Fixed by #1327
Closed

Symbol(nodeStream) error message with msw #1325

antham opened this issue Mar 18, 2024 · 2 comments · Fixed by #1327
Assignees
Labels
bug Something isn't working

Comments

@antham
Copy link

antham commented Mar 18, 2024

Describe the bug
Upgrading, from the 13.7.0 to the 13.7.1 I get this error message when performing calls with fetch with a mock defined using msw:

TypeError: Cannot read properties of null (reading 'Symbol(nodeStream)')

The error appears on all subsequent versions.

To Reproduce

I define a mock like the following using the last version of msw => https://github.com/mswjs/msw/releases/tag/v2.2.7

 server.use(
          http.put('/xxxx', async () => {
              return new HttpResponse('', { status: 204 });
          })
  );

When I define any string as the first parameter like the following, the error disappears:

 server.use(
          http.put('/xxxx', async () => {
              return new HttpResponse('No Content', { status: 204 });
          })
  );

Expected behavior
Not having any error like with the 13.7.0

@antham antham added the bug Something isn't working label Mar 18, 2024
@capricorn86 capricorn86 self-assigned this Mar 18, 2024
capricorn86 added a commit that referenced this issue Mar 18, 2024
…-message-with-msw

fix: [#1325] Fixes problem related to cloning a response without a body
@capricorn86
Copy link
Owner

Thank you for reporting @antham! 🙂

There is a fix in now:
https://github.com/capricorn86/happy-dom/releases/tag/v13.10.1

@antham
Copy link
Author

antham commented Mar 18, 2024

Thank you for the fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants