Closed priemskiyyy closed 2 weeks ago
Hi @priemskiyyy ! Thanks for opening this. In a more recent version we pre-filter invalid selector so that rrweb won't hit errors. This comes with the side effect that this may not block as expected, but incur less errors. Does this work for you or would you want some other precheck mechanism (e.g. fast fail on startup)?
Hey @lewgordon-amplitude , Sorry for the delay. I tested the latest version, and it works fine. Thanks for addressing the issue and for your support!
Awesome, glad to hear!
Expected Behavior
No errors should occur in this section of the code.
Current Behavior
A few days ago, we noticed a significant increase in error events in Sentry originating from
rrweb
package. Previously, there were no issues. The stack trace indicates that the error occurs in the following part ofrrweb
code:Additionally, sometimes we encounter this error:
SyntaxError: '' is not a valid selector.
Possible Solution
Extra checks in the highlighted part of the code to ensure blockSelector is valid before using it?
Steps to Reproduce
@amplitude/analytics-browser
,@amplitude/plugin-session-replay-browser
Environment