You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(uncaught exception)Error: Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used: - A server/client branch if (typeof window !== 'undefined'). - Variable input such as Date.now() or Math.random() which changes each time it's called. - Date formatting in a user's locale which doesn't match the server. - External changing data without sending a snapshot of it along with the HTML. - Invalid HTML tag nesting. It can also happen if the client has a browser extension installed which messes with the HTML before React loaded. https://react.dev/link/hydration-mismatch ... <Router basename="/" location={{pathname:"/", ...}} navigationType="POP" navigator={{...}}> <DataRoutes routes={[...]} future={{...}} state={{...}}> <RenderErrorBoundary location={{pathname:"/", ...}} revalidation="idle" component={<Layout>} error={undefined} ...> <RenderedRoute match={{params:{}, ...}} routeContext={{outlet:null, ...}}> <Layout> <html lang="en"> <head> <meta> <meta> <Meta> <Links> + <style dangerouslySetInnerHTML={{__html:"\n/* /app/..."}}> - {" "} ... ...
The text was updated successfully, but these errors were encountered:
I'm using React Router as a...
framework
Reproduction
When using Cypress in e2e mode, the React Router application fails with the error "Hydration failed." This happens in both SPA and SSR modes.
The following example was created with create-react-router, and Cypress was installed.
To reproduce the error:
pnpm dev
in one terminal.pnpm cy:open
in another terminal.If you access the application using Chrome or any other browser outside of Cypress, everything works as expected.
Link to repository:
https://github.com/javialon26/react-router-cypress
System Info
Used Package Manager
pnpm
Expected Behavior
The application must render without error.
Actual Behavior
An hydration error occurs:
The text was updated successfully, but these errors were encountered: