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
We recently updated our Hydrogen 2.0 to the latest version "2025.1.2".
Before update, on the version "2024.7.3" it was OK.
But the new version throwing two errors, one after another:
"Cannot read properties of null ( reading 'appendChild')"
"Cannot redefine property: Shopify "
This wasn't happening on the older version.
And we are not using window.Shopify anywhere in the code right now
But I found that if I delete _tracking_consent cookie from the browser dev tools, and reload the page - there is no error anymore, and all events are collected. Untill I reload page again...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, everyone.
We have weird Analytics.Provider behaviour.
We recently updated our Hydrogen 2.0 to the latest version "2025.1.2".
Before update, on the version "2024.7.3" it was OK.
But the new version throwing two errors, one after another:
This wasn't happening on the older version.
And we are not using window.Shopify anywhere in the code right now
But I found that if I delete
_tracking_consent
cookie from the browser dev tools, and reload the page - there is no error anymore, and all events are collected. Untill I reload page again...Here is payload we are passing to the provider
shop {
"shopId": "gid://shopify/Shop/69984911649",
"acceptedLanguage": "EN",
"currency": "GBP",
"hydrogenSubchannelId": "1000006324"
}
consent {
"checkoutDomain": "ukcheckout.thebeardstruggle.com",
"storefrontAccessToken": "25bf183axxxxxxxxxxxxxxxxxxxxxxxxxx",
"country": "CA",
"language": "EN",
"withPrivacyBanner": true,
"cookieDomain": "thebeardstruggle.com"
}
If consent.withPrivacyBanner = false , then this error happens always, and cookies removal doesn't help.
The Cookie banner is enabled on the Shopify admin.
Node version v20.16.0
Can someone help me understand the reason and how to fix it?
I tried this even with skeleton example from here https://github.com/Shopify/hydrogen/tree/main/examples/gtm .
It behaves the same.
Beta Was this translation helpful? Give feedback.
All reactions