Skip to content

Amplitude Session Replay Crashes when recording React Native (iOS) WebViews  #1215

@Yofret-Rios

Description

@Yofret-Rios

Hi! First of all, thanks for providing this awesome feature for React native

Expected Behavior

The expected behavior in this case is to be able to open a WebView while enabling WebView session replay recording

Current Behavior

Every time we try to open a WebView, the App Crashes. This occurs mostly on iOS devices.
Android devices seem not to be affected by this issue based on my testing

Steps to Reproduce

  1. Wrap the WebView inside AmpMaskView like so
    <AmpMaskView mask="amp-unmask" style={{ flex: 1 }}>
      <WebView ref={webViewRef} {...webviewProps} />
    </AmpMaskView>
  1. Build or run the app
  2. Try to access your WebView
  3. The app will crash with the following error on iOS
Image

Environment

  • SDK Version:
    • "@amplitude/analytics-react-native": "^1.4.13",
    • "@amplitude/plugin-session-replay-react-native": "^0.4.2",
  • Installation Method: NPM
  • Browser and Version: Not a Browser, but React Native 0.78.2

Note: This issue only occurs on iOS devices. I was able to capture this while debugging on Xcode:

Metadata

Metadata

Labels

RNReact Native SDKbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions