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

ReferenceError: TransformStream is not defined when running Server Components in Firefox #35763

Closed
1 task done
hrgui opened this issue Mar 31, 2022 · 2 comments · Fixed by #35796
Closed
1 task done

Comments

@hrgui
Copy link

hrgui commented Mar 31, 2022

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000
Binaries:
  Node: 16.14.0
  npm: 8.5.1
  Yarn: 1.22.17
  pnpm: N/A
Relevant packages:
  next: 12.1.4-canary.1
  react: 18.0.0
  react-dom: 18.0.0

What browser are you using? (if relevant)

Firefox 98.0.2

How are you deploying your application? (if relevant)

next dev

Describe the Bug

Any page that has server components do not work in Firefox.

Expected Behavior

Expected

Expected Firefox to load like Chrome.
Expected 3 components to show up (each one saying I am a server component).

Actual

ReferenceError: TransformStream is not defined

In production, Application error: a client-side exception has occurred (see the browser console for more information).

 1 of 3 unhandled errors
Unhandled Runtime Error

ReferenceError: TransformStream is not defined
Call Stack
useServerResponse
node_modules/next/dist/client/index.js (685:22)
ServerRoot
node_modules/next/dist/client/index.js (711:43)
renderWithHooks
node_modules/react-dom/cjs/react-dom.development.js (16141:0)
mountIndeterminateComponent
node_modules/react-dom/cjs/react-dom.development.js (20838:0)
beginWork
node_modules/react-dom/cjs/react-dom.development.js (22342:0)
callCallback
node_modules/react-dom/cjs/react-dom.development.js (4157:0)

To Reproduce

Production

  1. Open https://next-server-components-test.vercel.app/incremental-wait in Firefox.

Development

  1. clone this repo, https://github.com/hrgui/next-server-components-test and do npm install
  2. Run npm run dev
  3. Open http://localhost:3000/incremental-wait
@hrgui hrgui added the bug Issue was opened via the bug report template. label Mar 31, 2022
@hrgui
Copy link
Author

hrgui commented Mar 31, 2022

Other reproduction:

vercel/server-components-notes-demo#17 also exhibits the same issue when visiting latest deployment https://next-rsc-notes-krrz1emqw.vercel.sh/ in Firefox

@balazsorban44 balazsorban44 added kind: bug and removed bug Issue was opened via the bug report template. labels Mar 31, 2022
@kodiakhq kodiakhq bot closed this as completed in #35796 Mar 31, 2022
kodiakhq bot pushed a commit that referenced this issue Mar 31, 2022
)

Firefox doesn't support `TransformStream` but `ReadableStream` at the moment, change the implmentation of hydration to make firefox work with RSC

## Bug

Fixes #35763
x-ref: vercel/next-react-server-components#38

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants