getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.27k stars 4.21k forks source link

TypeError in Replays SDK - Cannot read properties of null (reading 'addEventListener') #80683

Open gil-gross-glbe opened 1 week ago

gil-gross-glbe commented 1 week ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

We're observing a significant number of errors in our production environment related to the Replays SDK. The error is in High volume reaching approximately 3.5M occurrences in a week. Image

Error occurs in the Sentry Replays bundle: https://browser.sentry-cdn.com/7.119.2/bundle.tracing.replay.debug.min.js:2:209910

Expected Result

The Replays SDK should properly handle element initialization and verify object existence before attempting to add event listeners.

Actual Result

The SDK attempts to call addEventListener on a null object

Product Area

Unknown

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 1 week ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 1 week ago

Routing to @getsentry/product-owners-replays for triage ⏲️

billyvg commented 1 week ago

@gil-gross-glbe thanks we'll take a look into this. I'm assuming this is happening in a normal browser environment? does this still occur if you turn off replays sampling?

can you email me with your org slug? billy at sentry.io -- I'd like to take a look into your account and make sure these errors get credited back to your account, as this shouldn't happen.

chargome commented 1 week ago

Hi @gil-gross-glbe!

So in this case the error does not actually occur in the SDK itself but rather in your application code on <anonymous>:1:1182 – which is just wrapped by our SDK. Could you check if you can find this part of your bundle?