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

Page is crashing during recording due to processing elements that are missed in current document #890

Closed
dkozlovskyi opened this issue May 6, 2022 · 8 comments · Fixed by #891
Labels
bug Something isn't working

Comments

@dkozlovskyi
Copy link
Contributor

Steps to reproduce:

  1. Start the rrweb recording process
  2. In your main tab navigate to https://edition.cnn.com/travel/article/qantas-project-sunrise-worlds-longest-flights-intl-hnk/index.html
  3. Open the page in the new tab by clicking on the link was still a priority for Qantas. Do not switch to newly opened tab.
  4. Open the page in the new tab by clicking on the link connecting Melbourne and Dallas. Do not switch to the newly opened tab.
  5. In your main tab observe development console errors and page performance.

Actual result: The page hangs, and within a few navigations, it crashes. rrweb exceptions are an observer in dev. console. Error happening due to processing element that doesn't exist in the document.
Expected result: The performance should not be impacted. Logic should better detect cases where an element doesn't exist in the document.

@dkozlovskyi
Copy link
Contributor Author

The issue can be fixed by changing validation of rootShadowHost in mutation.ts file.

Chaging it from (rootShadowHost === null || ...); to (!rootShadowHost || ...); solves the issue.

Please add your comments to this case. Happy to provide more details or make a PR.
Thanks.

@YunFeng0817
Copy link
Member

YunFeng0817 commented May 7, 2022

Thank you very much for the report. Your solution is correct. I didn't expect rootShadowHost to be undefined, because of the TS‘s type inference. Would you like to make a PR with a comment referenced to this Issue?

@YunFeng0817 YunFeng0817 added the bug Something isn't working label May 7, 2022
dkozlovskyi added a commit to dkozlovskyi/rrweb that referenced this issue May 9, 2022
@dkozlovskyi
Copy link
Contributor Author

Thanks for the quick reply.
Sure, here you go

@YunFeng0817 YunFeng0817 linked a pull request May 9, 2022 that will close this issue
Yuyz0112 pushed a commit that referenced this issue May 9, 2022
@pavlogavryliuk
Copy link

@Mark-Fenng is it expected that rootShadowHost to be a string?

image

@YunFeng0817
Copy link
Member

@pavlogavryliuk No, it should be an element or null.

@pavlogavryliuk
Copy link

@Mark-Fenng hmm, i caught an issue, when rootShadowHost is string

image

@YunFeng0817
Copy link
Member

That's ok, would you like to open a new issue and describe how to reproduce the bug?

@pavlogavryliuk
Copy link

@Mark-Fenng new issue about this was created.

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

Successfully merging a pull request may close this issue.

3 participants