rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

fix: safe pause

Open marandaneto opened this issue 1 year ago • 6 comments

https://github.com/rrweb-io/rrweb/pull/1432 introduces this class/method. Relates to https://github.com/PostHog/posthog/issues/21874 We also saw this issue in our error reporting tool.

Not sure this is the right fix since I cannot reproduce it locally but def. happened a few times in the latest alpha on Chrome 124 Win >= 10.

marandaneto avatar Apr 26 '24 12:04 marandaneto

🦋 Changeset detected

Latest commit: 1181b47fb839f6917603c76fd9872cdd971e4420

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
rrweb Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/types Patch
@rrweb/web-extension Patch
rrvideo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Apr 26 '24 12:04 changeset-bot[bot]

cc @Juice10

marandaneto avatar Apr 26 '24 12:04 marandaneto

If it's complaining about RRMediaElement, then the fix likely should be in rrdom?

I don't understand the abstract base class stuff too well, but maybe it just needs a concrete implementation of the pause function here: https://github.com/rrweb-io/rrweb/blob/master/packages/rrdom/src/index.ts#L152 ?

eoghanmurray avatar Apr 26 '24 13:04 eoghanmurray

If it's complaining about RRMediaElement, then the fix likely should be in rrdom?

I don't understand the abstract base class stuff too well, but maybe it just needs a concrete implementation of the pause function here: master/packages/rrdom/src/index.ts#L152 ?

https://github.com/rrweb-io/rrweb/blob/ae6908dcdcd7c732c1ce79eea19de5240bec1151/packages/rrdom/src/document.ts#L576-L578 should be the implementation since the class extends the base class with the method implementation, so no, I don't think so but not a JS/TS expert either.

marandaneto avatar Apr 26 '24 13:04 marandaneto

Any chance we could figure out what the type of element is that's being sent through? I'd like us to have a deeper fix if possible.

Juice10 avatar May 01 '24 14:05 Juice10

@marandaneto I'd prefer this fix although if we don't know exactly what's triggering it, it might not be helpful for your use case. https://github.com/rrweb-io/rrweb/pull/1462 Any chance you could check?

Juice10 avatar May 01 '24 15:05 Juice10

Any chance we could figure out what the type of element is that's being sent through? I'd like us to have a deeper fix if possible.

I'd love to, but I could not reproduce it, nor were the bug reports specific enough since it's an internal method.

marandaneto avatar May 02 '24 12:05 marandaneto

@marandaneto I'd prefer this fix although if we don't know exactly what's triggering it, it might not be helpful for your use case. #1462 Any chance you could check?

I could not reproduce the issue so I cannot check it but your PR makes sense to me, I added a comment with a possible improvement though, I think this is worth the shot.

marandaneto avatar May 02 '24 12:05 marandaneto

closing in favor of https://github.com/rrweb-io/rrweb/pull/1462 cc @daibhin

marandaneto avatar May 02 '24 12:05 marandaneto