Skip to content

[Bug]: Uncaught SyntaxError: Regular expression too large #1457

Closed
@mrfullset

Description

@mrfullset

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

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

rrweb.record({
        emit(event) {
          // send via websocket
        },
        recordCanvas: true,
        dataURLOptions: {
          type: 'image/webp',
          quality: 0.6,
        },
      });
rrweb.Replayer([],
        { root: this.$refs.container,
          liveMode: true,
          UNSAFE_replayCanvas: true,
          mouseTail: {
            strokeStyle: "#d0d4e1"
          }
        })

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions