-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Broken context w/ next 12.1.5-rc.2 and above #36198
Comments
I found a repro (also editing the OP to include these informations). It seems to be related to To reproduce, clone https://github.com/arcanis/next-bug-context-ssr, run |
Can confirm using a custom build now works, thanks for the quick fix! |
Thanks for reporting and digging deep! 🙏 |
Hi, the above patch is now available in |
My tests are now passing again as of |
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. |
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
An application I have is having a strange behavior after an upgrade from 12.1.0 to current. Bisecting the releases, the problem started in 12.1.5-canary.2. I presume it's from the React 18 upgrade, but I didn't try individual commits (is there an easy way to build them locally?).
I have some contexts defined inside layout components (using a pattern similar to the one described here), and since this upgrade those contexts are missing in the SSR build, crashing the direct page load (navigating to the page client-side works fine). It's almost as if pages were built without the _app wrapper.
Expected Behavior
Should work.
To Reproduce
To reproduce, clone https://github.com/arcanis/next-bug-context-ssr, run
yarn && yarn next dev
, and open localhost. It will crash. If you runyarn add next@12.1.5-canary.1
before restarting the server, it'll work.The text was updated successfully, but these errors were encountered: