-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Cannot read properties of null (reading 'appendChild') on init with FeedbackIntegration #12112
Comments
Thanks for reporting @artemgordinskiy, we'll get this fixed. |
I get a similar error (I think) when using the CDN. Shall I open a new issue? Here's the stack trace: [Error] TypeError: null is not an object (evaluating 'qo.body.appendChild')
j (bundle.tracing.replay.feedback.min.js:2:106826)
z (bundle.tracing.replay.feedback.min.js:2:108664)
setupOnce (bundle.tracing.replay.feedback.min.js:2:108879)
Sr (bundle.tracing.replay.feedback.min.js:2:45224)
(anonymous function) (bundle.tracing.replay.feedback.min.js:2:48417)
forEach
(anonymous function) (bundle.tracing.replay.feedback.min.js:2:48406)
_t (bundle.tracing.replay.feedback.min.js:2:48430)
init (bundle.tracing.replay.feedback.min.js:2:46931)
(anonymous function) (bundle.tracing.replay.feedback.min.js:2:227637)
(anonymous function) (bundle.tracing.replay.feedback.min.js:2:227640) |
@brecke No need to open a new issue, thanks for the report |
I think in both cases (using The repro case i've got boils down to this:
If you uncomment the I'll update the SDK so it is better able to handle when |
…12294) The error that folks are getting is something like this: `[Error] TypeError: null is not an object (evaluating 'qo.body.appendChild')` The problem seems to be that we're trying to inject the button into the html before the `<body>` is ready. Using async `<script defer>` or `<script async>` would probably help, but none of our snippets have that, and it would also defer error observers and everything else. What we can do for users it have the feedback integration wait before inserting the button + styles! This is a great reference: https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event Fixes #12112
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
8.2.1
Framework Version
No response
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
Expected Result
Sentry initialized successfully
Actual Result
The issue goes away if initialisation is done on document load/ready, but I don't see this being mentioned in the docs, so I thought this could be a bug.
The text was updated successfully, but these errors were encountered: