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

SSR hydration error with redirect: true #171

Open
aureldussauge opened this issue Mar 16, 2023 · 4 comments
Open

SSR hydration error with redirect: true #171

aureldussauge opened this issue Mar 16, 2023 · 4 comments

Comments

@aureldussauge
Copy link

How to reproduce :

The redirection is causing a hydration error
image

@aureldussauge aureldussauge changed the title SSR with redirect: true SSR hydration error with redirect: true Mar 16, 2023
@aureldussauge
Copy link
Author

Is it because the language is only checked at browser-side, so the redirect isn't detected at server-side then Gatsby sees a difference between the server-rendered page (/) and the actual page (/fr) ?

@madfcat
Copy link

madfcat commented Jun 14, 2023

Same issue.

After switching the language from the main language (for example, thewebsite.com), it will now redirect me to thewebsite.com/es/ for example. Now when the second language is remembered as a choice, when If I try to access the website directly typing its URL (thewebsite.com) without language path, it gives 2 errors Error #418 and Error #423:

react-dom.production.min.js:132 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at fa (react-dom.production.min.js:132:198)
    at qu (react-dom.production.min.js:226:193)
    at ks (react-dom.production.min.js:281:85)
    at bs (react-dom.production.min.js:280:450)
    at vs (react-dom.production.min.js:280:320)
    at gs (react-dom.production.min.js:280:180)
    at ls (react-dom.production.min.js:268:209)
    at S (scheduler.production.min.js:13:203)
    at MessagePort.T (scheduler.production.min.js:14:128)
fa @ react-dom.production.min.js:132
qu @ react-dom.production.min.js:226
ks @ react-dom.production.min.js:281
bs @ react-dom.production.min.js:280
vs @ react-dom.production.min.js:280
gs @ react-dom.production.min.js:280
ls @ react-dom.production.min.js:268
S @ scheduler.production.min.js:13
T @ scheduler.production.min.js:14
react-dom.production.min.js:293 Uncaught Error: Minified React error #423; visit https://reactjs.org/docs/error-decoder.html?invariant=423 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at xi (react-dom.production.min.js:293:39)
    at bs (react-dom.production.min.js:280:389)
    at vs (react-dom.production.min.js:280:320)
    at gs (react-dom.production.min.js:280:180)
    at as (react-dom.production.min.js:271:88)
    at ls (react-dom.production.min.js:268:429)
    at S (scheduler.production.min.js:13:203)
    at MessagePort.T (scheduler.production.min.js:14:128)

@grgcnnr
Copy link

grgcnnr commented Aug 24, 2023

I'm also experience this.

@Binibeno
Copy link

I’m still having the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants