rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

[Bug]: isCheckout会触发两次

Open wensiyuanseven opened this issue 2 years ago • 8 comments

Preflight Checklist

  • [X] 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.8

Expected Behavior

期望制作一次全量快照时,isCheckout只触发一次

Actual Behavior

最新版本,重新制作一次全量快照时,isCheckout触发了两次

Steps to Reproduce

重新制作一次全量快照时,isCheckout触发了两次

Testcase Gist URL

No response

Additional Information

No response

wensiyuanseven avatar Jun 20 '23 07:06 wensiyuanseven

@Juice10

wensiyuanseven avatar Jun 23 '23 16:06 wensiyuanseven

@wfk007

wensiyuanseven avatar Jun 25 '23 07:06 wensiyuanseven

有人在看这个问题吗

wensiyuanseven avatar Jun 25 '23 07:06 wensiyuanseven

@wensiyuanseven 能提供个可以复现问题的仓库不,我看一下

wfk007 avatar Jun 27 '23 02:06 wfk007

Me too

Version v2.0.0-alpha.10

chowkings avatar Aug 14 '23 09:08 chowkings

Me too

Version v2.0.0-alpha.10

@chowkings can you provide a minimum git repository?

wfk007 avatar Aug 24 '23 03:08 wfk007

I only used translate on the OP but if I understand correctly, when we call takeFullSnapshot(true), we will receive two distinct events with the isCheckout arg as true. Looking at the blame this is due to #1141.

If you use checkoutEvery... and rely on isCheckout to reset existing events, this means that the Meta event will be lost because the FullSnapshot occurs afterwards, and isCheckout is true for both events. Losing the Meta event means that the replayer will be unable to set its dimensions, making the replay look broken.

cc @YunFeng0817

billyvg avatar Dec 08 '23 20:12 billyvg

I only used translate on the OP but if I understand correctly, when we call takeFullSnapshot(true), we will receive two distinct events with the isCheckout arg as true. Looking at the blame this is due to #1141.

If you use checkoutEvery... and rely on isCheckout to reset existing events, this means that the Meta event will be lost because the FullSnapshot occurs afterwards, and isCheckout is true for both events. Losing the Meta event means that the replayer will be unable to set its dimensions, making the replay look broken.

cc @YunFeng0817

v2.0.0-alpha.14 has same problem。

as the guide showed ,user can use isCheckout to distinguish event into different eventsMatrix。

cuijiudai avatar Jun 07 '24 06:06 cuijiudai