Next.js Discord

Discord Forum

Why am I getting hydration error ?

Answered
Siberian posted this in #help-forum
Open in Discord
Avatar
SiberianOP
Console 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.
Image
Answered by Asian black bear
It's caused by the Colorzilla extension. Disable it or run the browser in incognito mode which disables all extensions.
View full answer

4 Replies

Avatar
Asian black bear
It's caused by the Colorzilla extension. Disable it or run the browser in incognito mode which disables all extensions.
Answer
Avatar
SiberianOP
how did you know that i have that extension ? haha
its fixed now 🙂
Avatar
Asian black bear
Because the custom attributes cz-* are added by the extension to the DOM after loading a page and people have been asking for help with the almost daily