Skip to content
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

[Bug]: Cannot read properties of null (reading 'tagName') #1444

Closed
1 task done
alecmocatta opened this issue Apr 9, 2024 · 3 comments
Closed
1 task done

[Bug]: Cannot read properties of null (reading 'tagName') #1444

alecmocatta opened this issue Apr 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@alecmocatta
Copy link

alecmocatta commented Apr 9, 2024

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb

Version

2.0.0-alpha.12

Expected Behavior

No uncaught exceptions.

Actual Behavior

There is an uncaught exception triggering the window error event:

TypeError: Cannot read properties of null (reading 'tagName')

on this line:

if ((n.parentNode as Element).tagName === 'TEXTAREA') {

Steps to Reproduce

In my app press cmd+backspace on any non-empty line in a contentEditable div. Unfortunately my app's not public yet.

Testcase Gist URL

No response

Additional Information

I use rrweb thru PostHog session replay and capture all backtraces from the window error event. Because whatever loads this script (I presume PostHog?) loads it without crossorigin set I initially just got a "Script error." error event. It was reproducing locally with the debugger open that I got the aforementioned error and tracked it down to the aforementioned line.

@metal-messiah
Copy link

To keep this issue alive, many of our customers have also reported seeing this error. We are using the same version noted above in our instrumentation library.

@metal-messiah
Copy link

⬆️ The way New Relic is currently planning on circumventing this until a bigger fix is implemented is to intercept the error using rrweb's errorHandler configuration, and flagging the error object in such a way as to not report it as a customer-based error.

@eoghanmurray
Copy link
Contributor

Fixed in #1445 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants