Firebase Messaging Causes ANR on Notification Receive in Flutter App (Even with Minimal Handler)
- 0
- Android
- Flutter
- Messaging

I am working on a Flutter project where I have set up notifications using Firebase Messaging. Everything was working perfectly until recently. After coming back to the project after a long time and running the code again, the app crashes with an ANR (Application Not Responding) when a notification is received.
The notification is received, and the foreground handler gets the data, but then the app crashes immediately.
After debugging, I realized that once the notification is received, something takes a long time to process, which is likely causing the crash.
To investigate further, I removed all heavy tasks and left only a simple print log inside the handler—but the crash still occurs.
Recommended threads
- White Screen of Death
I am building an android application which is using React native(EXPO) and Appwrite. But While using the App in the Expo Go or Orbit it works perfectly wihout e...
- Can't reach Frankfurt server
I have been developing an IoT device that senses an event, takes a picture and pushes the jpg to an appwrite project. I'm using a Sixfab Pico LTE board that cou...
- Flutter - FCM: App Crashes when receivin...
