I have a hydration error that seems to be caused by the Bitwarden extension - I'm on react 18.3 (I saw there were issues on 18.1-18.2, but thought they were fixed for 18.3). Looking around it seems the common suggestion is to develop in incognito -- but at least my hydration error occurs in prod builds as well (https://react.dev/errors/418?invariant=418). I expect many of my users will have browser extensions that cause hydration errors so is there a way to use Remix with browser extensions?
#What to do about hydration errors caused by extensions?
1 messages · Page 1 of 1 (latest)
The hydration issue when extensions modify the <head> was a bug in React that was fixed in react 18.3-canary, which is AFTER 18.3
if you update to the React 19 RC, that category of issue is fixed
This isn't a remix specific error, this affects every react app (next js too) that uses SSR on react 18.3-canary and earlier
I don't think the bug is limited to <head>. Long discussion about this bug here: https://github.com/facebook/react/issues/24430
Upgrading React does seem to be the only solution, unfortunately.
GitHub
React version: 18.0.0, 18.1.0-next-fc47cb1b6-20220404 (latest version in codesandbox) Steps To Reproduce Install a plugin that creates a script tag at the top(ex: Apollo Client Devtools) Go to the ...
the 18.3.0 canary is after 18.3.1?
Hm well it seems that switching to 18.3.0-canary-c3048aab4-20240326 introduces its own errors in the form of TypeError: Cannot read properties of null (reading 'useContext') on every page I have - I'll start a fresh project on 18.3.0 canary and see if I can track it down, but seems weird that going from 18.3.1 to 18.3.0 canary caused such errors
This issue happens on a starter remix project on the latest react rc 19.0.0-rc-e210d081-20240909, but seems to not happen on the stater project on 18.3.0 canary or 19.0.0-rc.0. A bunch of shadcn/ui components cause that error on >18.3.0 canary
That error tends to be caused by more than one react version installed so probably just didn’t get installed properly
They probably have a dependency that needs to be overridden
Yeah I just got it working - had to delete my entire bun cache and on reinstall it worked
haha yeah I only figured out it was something like that after migrating most of the project to pnpm and it working
hm I wonder if this is a bug in Bun
wow rare jarred sighting
but is this the right thread? I can't see how bun would affect this