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]: rrweb is throwing error if blockSelector is used and the matched element is not found. #1409

Open
1 task done
ashokduraikeg opened this issue Feb 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ashokduraikeg
Copy link

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.4

Expected Behavior

When the blockSelector is configured, the rrweb should not throwing error and record if the blockSelector matched element is not found.

Actual Behavior

When the blockSelector is configured, the rrweb is throwing error and failed record if the blockSelector matched element is not found.
image
image

Steps to Reproduce

Step 1: Configure rrweb by passing below config in any html page.
rrweb.record({
emit(event) {
console.log(event)
},
"sampling": {
"media": 1000,
"mouseInteraction": true,
"scroll": 1000,
"input": "last",
"mousemove": false
},
"slimDOMOptions": true,
"blockSelector": ".clock",
"ignoreSelector": ".search-input",
"maskTextSelector": ".logo-title"
})
Step 2: Make sure there is element with the class name "clock"
Step 3: Load the html page in a browser.
Step 4: Now rrweb will theow the below error
image

Testcase Gist URL

No response

Additional Information

No response

@ashokduraikeg ashokduraikeg added the bug Something isn't working label Feb 12, 2024
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

1 participant