Closed stevenbister closed 4 weeks ago
I can also confirm on y side that there is a hydration error. Is there a fix?
The error may be more related to the Script
tag. I tried using another third-party script, which still gave me hydration errors. I also believe that hydration errors start to appear when you do dangerouslySetInnerHTML
. I loaded a script with only src
and there were no issues.
I spent some time trying to preproduce this and was unable to. Could you please provide a Github Repo or a more complete example? I recommend loading 3rd party scripts with useLoadScript
which delays loading the script until after hydration.
Closing due to lack of feedback.
Hi @blittle , we are still seeing this issue. I am not sure if you'd be keen to do a screen share to see it, or if there is another way I can help you reproducte the problem.
Thanks.
Hi @blittle , we are still seeing this issue. I am not sure if you'd be keen to do a screen share to see it, or if there is another way I can help you reproducte the problem.
Thanks.
@lluisgassovillarejo the more specifics you can give with the problem narrowed down. Easiest would be to generate a new project via npm create @shopify/hydrogen@latest
. Modify the project to produce the hydration error. Then share that repo.
Thanks @blittle ,
Although I managed to replicate the error, it is prooving very elusive. I will update this if I come across it again. Otherwise, I think we can close this one.
Apologies for the inconvenience.
Make sure to use an incognito window when testing hydration errors, because browser extensions can erroneously cause them.
What is the location of your example repository?
https://github.com/stevenbister/hydrogen-hydration-errors
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
2024.4.6
What version of Remix are you using?
2.9.2
Steps to Reproduce
Add the required secrets and add the GTM ID to the GTM script in the root.tsx and run the app with
npm run dev
.Open the dev tools and go to the console
Expected Behavior
I would expect there should be no errors logged in the console
Actual Behavior
When using
along with
in the demo store there is a hydration error caused that says
This error goes away if you remove the
jsonLd
property from the seo payload or remove the GTM script, ideally would be able to use both together