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]: The message listener for iframe getting duplicated, if started recording after stop recording. #1590

Open
1 task done
chetan-187 opened this issue Oct 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@chetan-187
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

[email protected]

Expected Behavior

The message listeners should get cleared, if the recording is started after stopping. Since all observers and listeners gets cleared

Actual Behavior

The message listener of iframe gets added after stop and recording again.

Steps to Reproduce

  1. Call record function of rrweb, with recordCrossOrigin: true option
  2. Stop the recording by calling function returned by record function
  3. Call record function again
  4. Look at the global listeners, the message listener from iframe-manager gets added everytime.

Testcase Gist URL

No response

Additional Information

No response

@chetan-187 chetan-187 added the bug Something isn't working label Oct 28, 2024
@chetan-187
Copy link
Author

Can this be solved by making IframeManager a singleton class and removing the message handler before initializing new one?

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