-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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]: Uncaught SyntaxError: Regular expression too large #1457
Comments
We are also seeing this. |
It seems to be coming from rrweb/packages/rrweb-snapshot/src/rebuild.ts Lines 112 to 118 in 26c331b
|
@priyankblitzz we didn't have any workaround other than rolling back rrweb to alpha.11 |
I'm not sure what has changed such that it's now generating a bigger CSS regex on the first There's also #1458 which makes improvements and might be able to fix it although not quite currently ready for merge. |
…ression too large) - see test case which is extracted from a real world css file; the selector regex was able to traverse the curly brace as when looking for quotes, it wasn't taking into account that the start quote could be escaped
Could you guys review or apply #1481 to verify that it fixes it? |
* Fix and test for bug #1457 (Uncaught SyntaxError: Regular expression too large) - see test case which is extracted from a real world css file; the selector regex was able to traverse the curly brace as when looking for quotes, it wasn't taking into account that the start quote could be escaped * Apply formatting changes * Create fair-ducks-clean.md * Fix @import regex bit which was stopping consumption in the middle of a url - need to consume quotes. Thanks [email protected] for reporting and isolating this case --------- Co-authored-by: eoghanmurray <[email protected]>
just tried the latest version(alpha 14) in my web app and it is working fine now. The issue is resolved for me now. Thank you so much for taking care of the issue. |
…ression too large) - see test case which is extracted from a real world css file; the selector regex was able to traverse the curly brace as when looking for quotes, it wasn't taking into account that the start quote could be escaped
Preflight Checklist
What package is this bug report for?
rrweb
Version
v2.0.0-alpha.13
Expected Behavior
Live mode replay starts
Actual Behavior
rrweb fails with an error in a console:
Uncaught SyntaxError: Invalid regular expression: (huge CSS contents) Regular expression too large
Steps to Reproduce
Testcase Gist URL
No response
Additional Information
The same code as in "Steps to Reproduce" section worked with
v1.1.3
.CSS inside of a regex are generated by Tailwind.
The text was updated successfully, but these errors were encountered: