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
For new users visiting our site for the first time on Chrome or Safari, we are seeing intermittent "_registerComponent(...): Target container is not a DOM element." errors with probably about 5% of the requests that come in. The issues is intermittent and not easily reproducible unfortunately, which makes me think it's a race condition. Note these are users who have never been to the site and are downloading the assets for the first time.
If I move the this.props.headComponents below the gatsby div, the issue appears to be resolved.
Is there another way I can address this? Seems not awesome to move headComponents out of head. But it does seem that the JS in the headComponents are dependent on the gatsby div being read and in the DOM.
It used to be below the body but moved it to the head for a bit of a speed boost on TTI. But given it can cause trouble and we're already using <link preload>, which the next version of Safari supports as well as a coming version of Firefox, I think we're safe moving things back below the <body>.
Looks like in my case when I add the Third Party docsearch.js script for the search before the tag I'm getting the error. I'm adding that script via Netlify (Post processing)
gatsby-version: 1.0.0-beta.5
node version: 6.1
For new users visiting our site for the first time on Chrome or Safari, we are seeing intermittent "_registerComponent(...): Target container is not a DOM element." errors with probably about 5% of the requests that come in. The issues is intermittent and not easily reproducible unfortunately, which makes me think it's a race condition. Note these are users who have never been to the site and are downloading the assets for the first time.
Here's a couple views of the stacktrace:
Here's a simplified view of our html.jsx file:
Reading this issue:
https://stackoverflow.com/questions/26566317/invariant-violation-registercomponent-target-container-is-not-a-dom-elem
If I move the this.props.headComponents below the gatsby div, the issue appears to be resolved.
Is there another way I can address this? Seems not awesome to move headComponents out of head. But it does seem that the JS in the headComponents are dependent on the gatsby div being read and in the DOM.
Thanks!
The text was updated successfully, but these errors were encountered: