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

fix(replay): Fix potential broken CSS in styled-components #9234

Merged
merged 4 commits into from
Oct 13, 2023

Commits on Oct 13, 2023

  1. fix(replay): Fix potential broken CSS in styled-components

    NOTE: This requires a bump to rrweb library
    
    Fixes an issue where the Replay integration can potentially break applications that use `styled-components`. `styled-components` [relies on an exception being throw](https://github.com/styled-components/styled-components/blob/b7b374bb1ceff1699f7035b15881bc807110199a/packages/styled-components/src/sheet/Tag.ts#L32-L40) for CSS rules that are not supported by the browser engine. However, our SDK suppresses any exceptions thrown from within rrweb, so `styled-components` assumes that an unsupported rule was inserted successfully and increases a rule index, which causes following inserted rules to fail due to an out-of-bounds error.
    
    getsentry/rrweb#111 introduces a change the adds metadata to exceptions that occur when calling `insertRule`, and this PR will re-throw those exceptions that will then bubble up to `styled-components`.
    
    Fixes #9170
    billyvg authored and mydea committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    7e851da View commit details
    Browse the repository at this point in the history
  2. errorHandler should only annotate error, we want it to re-throw so do…

    … not return true
    billyvg authored and mydea committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    b744494 View commit details
    Browse the repository at this point in the history
  3. prettier

    billyvg authored and mydea committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    0f8dd6a View commit details
    Browse the repository at this point in the history
  4. try-catch writing error

    mydea committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    a66168f View commit details
    Browse the repository at this point in the history