Skip to content

Session Replay: Continuous animations prevent screenshot capture #5404

@serglom21

Description

@serglom21

Integration

sentry-android

Build System

Gradle

AGP Version

N/A

Proguard

Enabled

Other Error Monitoring Solution

No

Version

8.38.0

Steps to Reproduce

When an Activity contains continuous animations (e.g. a looping bounce animation on a UI element), Session Replay fails to capture new screenshot frames. The replay shows user gestures/interactions correctly, but the visual stream freezes on the last successfully captured frame, resulting in a stale/stuck image for the duration of the animated screen.

Steps to Reproduce

  • Create an Activity with a continuously looping animation (e.g. a small image bouncing up and down via an infinite ObjectAnimator or similar).
  • Initialize Sentry with Session Replay enabled.
  • Navigate to the animated Activity.
  • Observe the replay, the screen will appear frozen while gesture events continue to be recorded.
  • Navigate away from the animated Activity — captures resume.

Expected Result

Session Replay should capture screenshot frames even when continuous animations are running. The 1fps capture should still produce valid frames regardless of ongoing invalidations from animations.

Actual Result

The replay visual stream freezes for the entire duration the user is on a screen with continuous animations. Logcat with options.debug = true and options.sessionReplay.debug = true shows:

Capturing a frame.
Capturing screenshot, isCapturing: true
Capturing screenshot, contentChanged: true, lastCaptureSuccessful: false
Posting the capture runnable again, frame rate is 1 fps.
Failed to determine view hierarchy, not capturing

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions