Skip to content

Android Replay drops configuration before async startup #6144

Description

@buenaflor

Description

ReplayIntegration.onConfigurationChanged() discards configuration while Replay is not recording. With asynchronous startup, this can leave Flutter Replay without configuration and produce no frames.

Timeline

  1. Replay startup is queued on the main thread.
  2. Flutter sends screenshot dimensions before startup completes; native discards them because Replay is not recording yet.
  3. Replay starts, but the widget size remains unchanged, so no new configuration arrives and no frames are recorded.

Evidence

Reproduced on Pixel 4, Android 13, Flutter SDK 9.30.0: native 8.53.0 works; 8.54.0 fails, consistent with the async lifecycle change in #5965. Resending configuration after startup restores recording.

Proposed fix

Retain the latest valid configuration, apply it to the capture strategy and recorder on startup, preserve it across stop/start, and clear it on close. Add regression coverage that verifies recorded frames when configuration arrives before startup.

Flutter issue: getsentry/sentry-dart#4034
Flutter workaround: getsentry/sentry-dart#4037

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions