Skip to content

Session Replay causes periodic ~1s UI jitter (replaysOnErrorSampleRate) #5655

@thomasttvo

Description

@thomasttvo
ScreenRecording_02-11-2026.14-51-51_1.mov

Description

When replaysOnErrorSampleRate is set to a value greater than 0, the app experiences periodic ~1 second UI stalls/jitter. This appears to be caused by Session Replay's screenshot capture mechanism blocking the main thread.

The jitter occurs roughly every 1-2 seconds and is clearly visible during animations or fast gesture interactions. Setting replaysOnErrorSampleRate: 0 eliminates the issue entirely.

Reproduction

Minimal repro app: https://github.com/thomasttvo/sentry-replay-jitter-repro

The app animates a ball in a circle while measuring frame-to-frame intervals on the UI thread via Reanimated's useFrameCallback. Frames exceeding 20ms are flagged as jitter and displayed as red spikes on a chart.

Steps:

  1. Clone the repo, yarn install, cd ios && pod install
  2. Run the app on a physical iOS device
  3. Press "Run Test (6s)" with Replay OFF — observe minimal/no jitter spikes
  4. Toggle Replay ON, kill and restart the app
  5. Press "Run Test (6s)" again — observe periodic red jitter spikes in the chart

Sentry Config

Sentry.init({
  dsn: '...',
  enableAutoPerformanceTracing: false,
  tracesSampleRate: 0,
  replaysOnErrorSampleRate: 1.0, // jitter occurs when > 0
  replaysSessionSampleRate: 0,
});

Environment

  • @sentry/react-native: ^6.14.0
  • react-native: 0.83.2
  • react-native-reanimated: ^3.19.4
  • Device: iPad Pro (physical device)
  • iOS version: 18.x

Note: This has only been tested on iOS. It would be good to verify whether Android is also affected.

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions