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]: isCheckout会触发两次 #1242

Open
1 task done
wensiyuanseven opened this issue Jun 20, 2023 · 8 comments
Open
1 task done

[Bug]: isCheckout会触发两次 #1242

wensiyuanseven opened this issue Jun 20, 2023 · 8 comments
Labels
bug Something isn't working reproduction needed A testcase or reproduction is needed for this issue to be further investigated

Comments

@wensiyuanseven
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

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 wensiyuanseven added the bug Something isn't working label Jun 20, 2023
@wensiyuanseven
Copy link
Author

@Juice10

@wensiyuanseven
Copy link
Author

@wfk007

@wensiyuanseven
Copy link
Author

有人在看这个问题吗

@wfk007
Copy link
Contributor

wfk007 commented Jun 27, 2023

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

@Juice10 Juice10 added the reproduction needed A testcase or reproduction is needed for this issue to be further investigated label Aug 4, 2023
@chowkings
Copy link

Me too

Version
v2.0.0-alpha.10

@wfk007
Copy link
Contributor

wfk007 commented Aug 24, 2023

Me too

Version v2.0.0-alpha.10

@chowkings can you provide a minimum git repository?

@billyvg
Copy link
Contributor

billyvg commented Dec 8, 2023

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 added a commit to getsentry/rrweb that referenced this issue Dec 11, 2023
…io#1141)" (#139)

This reverts commit 3416c3a.


From [my comment
here](rrweb-io#1242 (comment))

> 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
rrweb-io#1141.

> If you use `checkoutEvery...` and rely on `isCheckout` to reset
existing events, this means that the [`Meta`
event](https://github.com/rrweb-io/rrweb/blob/master/packages/rrweb/src/record/index.ts#L352-L362)
will be lost because [the
`FullSnapshot`](https://github.com/rrweb-io/rrweb/blob/master/packages/rrweb/src/record/index.ts#L408-L417)
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.
billyvg added a commit to getsentry/rrweb that referenced this issue Apr 26, 2024
…io#1141)" (#139)

This reverts commit 3416c3a.

From [my comment
here](rrweb-io#1242 (comment))

> 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

> If you use `checkoutEvery...` and rely on `isCheckout` to reset
existing events, this means that the [`Meta`
event](https://github.com/rrweb-io/rrweb/blob/master/packages/rrweb/src/record/index.ts#L352-L362)
will be lost because [the
`FullSnapshot`](https://github.com/rrweb-io/rrweb/blob/master/packages/rrweb/src/record/index.ts#L408-L417)
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.
@cuijiudai
Copy link

cuijiudai commented Jun 7, 2024

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。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproduction needed A testcase or reproduction is needed for this issue to be further investigated
Projects
None yet
Development

No branches or pull requests

6 participants