-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
9.31.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
No reproduction repo available yet. Reporter will provide additional context.
Error occurs when Session Replay is enabled and certain DOM nodes are non-extensible.
Steps to Reproduce
- Initialize Sentry with Session Replay enabled
- Have a page where certain DOM nodes are frozen/sealed (possibly by third-party scripts)
- Observe error in console
Expected Result
Replay should gracefully handle non-extensible DOM nodes without throwing uncaught errors.
Actual Result
Uncaught TypeError: Cannot add property __ln, object is not extensible
at lz.addNode (index.js:1834:1)
at i (index.js:1930:1)
at lJ.emit (index.js:2013:1)
at lJ.processMutations (index.js:1905:1)
at MutationObserver. (index.js:2418:1)
This error cascades and can affect other tools on the page.
See internal ticket for more info.
Additional Context
The addNode function in rrweb attempts to set n2.__ln = node without try/catch protection. When encountering DOM nodes that have been made non-extensible (via Object.freeze(), Object.seal(), or Object.preventExtensions()), this throws an uncaught TypeError.
The errorHandler in the integration handles frozen error objects, but not frozen DOM nodes in addNode.
Reporter indicates this started suddenly without SDK updates, suggesting environmental factors (third-party scripts) may be freezing DOM nodes.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Projects
Status