Skip to content

safari intermittently not recording changes in session replayΒ #27831

@pauldambra

Description

@pauldambra

Bug Description

Image

here's what i know so far

this was made more obvious by rrweb-io/rrweb#1597 but i don't think caused by it

  • when another library has patched (in the rrweb code "tainted") one of a set of browser functions or objects
  • rrweb adds an iframe to the DOM and attempts to load an unpatched version from the window in that iframe
  • this is particularly important for angular apps where zone's change detection fights rrweb's and causes performance issues
  • this works in chrome
  • in safari it doesn't work (or doesn't always work 🀷)
  • meaning a recording gets a full snapshot but no mutations

a wonderful customer created https://github.com/rugs65ducat/minimal-repro which lets me recreate this locally

in stepping through what is happening

in both chrome and safari i can load the MutationObserver from the iframe
in both i can init the observer
but if i add e.g. a console log to the callback on observed mutation i only ever see that run in chrome

Debug info

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions