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

TransformStream is not defined #38

Closed
rajabzadeh1986 opened this issue Mar 28, 2022 · 5 comments
Closed

TransformStream is not defined #38

rajabzadeh1986 opened this issue Mar 28, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@rajabzadeh1986
Copy link

I have an error in rsc
ReferenceError: TransformStream is not defined.

and in csr
Error: Hydration failed because the initial UI does not match what was rendered on the server.

What is the problem?

@huozhi
Copy link
Member

huozhi commented Mar 28, 2022

@rajabzadeh1986 can you provide some repro steps or the info about your environment?

TransformStream and ReadableStream are the required global polyfills for react streaming

@rajabzadeh1986
Copy link
Author

I'm using Firefox and I think TransformStream is not compatible with Firefox.

image

https://developer.mozilla.org/en-US/docs/Web/API/TransformStream

This problem did not exist in Chrome.

@huozhi
Copy link
Member

huozhi commented Mar 28, 2022

So far we're using them on server side, can you share your error traces of ReferenceError: TransformStream is not defined. ?

@rajabzadeh1986
Copy link
Author

Unhandled Runtime Error

ReferenceError: TransformStream is not defined
Call Stack
useServerResponse
node_modules\next\dist\client\index.js (674:22)
ServerRoot
node_modules\next\dist\client\index.js (696:43)
renderWithHooks
node_modules\react-dom\cjs\react-dom.development.js (16179:0)
mountIndeterminateComponent
node_modules\react-dom\cjs\react-dom.development.js (20839:0)
beginWork
node_modules\react-dom\cjs\react-dom.development.js (22362:0)
callCallback
node_modules\react-dom\cjs\react-dom.development.js (4161:0)
invokeGuardedCallbackDev
node_modules\react-dom\cjs\react-dom.development.js (4210:0)
invokeGuardedCallback
node_modules\react-dom\cjs\react-dom.development.js (4274:0)
beginWork$1
node_modules\react-dom\cjs\react-dom.development.js (27280:0)
performUnitOfWork
node_modules\react-dom\cjs\react-dom.development.js (26429:0)
workLoopSync
node_modules\react-dom\cjs\react-dom.development.js (26340:0)
renderRootSync
node_modules\react-dom\cjs\react-dom.development.js (26308:0)
performConcurrentWorkOnRoot
node_modules\react-dom\cjs\react-dom.development.js (25632:0)
workLoop
node_modules\scheduler\cjs\scheduler.development.js (266:0)
flushWork
node_modules\scheduler\cjs\scheduler.development.js (239:0)
performWorkUntilDeadline
node_modules\scheduler\cjs\scheduler.development.js (533:0)

@huozhi huozhi added the bug Something isn't working label Mar 29, 2022
kodiakhq bot pushed a commit to vercel/next.js 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`
@huozhi
Copy link
Member

huozhi commented Mar 31, 2022

Fixed in #35796, can you try bump the next version to v12.1.5-canary.0? 🙏

pavleadev pushed a commit to pavleadev/next.js that referenced this issue Mar 29, 2023
…796)

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`
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

No branches or pull requests

2 participants