Skip to content

[question]: ANR: OneSignalUser.lifecycleInit blocks main thread via waitForInit on app startup #1147

@hamidZodray4534

Description

@hamidZodray4534

How can we help?

Bug Report

SDK Version

  • onesignal_flutter: 5.5.4
  • Flutter: (your flutter version)
  • Android: (your target SDK)

Description

The app receives repeated ANRs in production (Google Play Console) caused by
OneSignalUser.lifecycleInit blocking the main thread via runBlocking inside
waitForInit. This happens automatically when the Flutter method channel is
registered — before any user Dart code calls OneSignal.initialize().

The ANR is NOT caused by user code. It is triggered internally by the plugin
itself via lifecycleInit on onMethodCall.

ANR Stack Trace

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions