Skip to content
Init is here / May 19 - 23
Back

Flutter - FCM: App Crashes when receiving Push Notification

  • 0
  • Android
  • Flutter
  • Messaging
  • Cloud
IKINDU
23 May, 2025, 11:07
TL;DR
Developers experiencing app crashes related to Flutter FCM push notifications. Check potential ANR causes. Reported bug on Stack Overflow. Logs show resource files for push notification icons. Solution might involve examining main.dart, notification_service.dart, and AndroidManifest.xml for issues causing the crash. Check for stacktrace details.
Darshan Pandya
23 May, 2025, 11:09

hey πŸ‘‹, whats the stacktrace for the crash?

IKINDU
23 May, 2025, 11:18

Hello, thanks for the quick response. Please, check my codes below.

main.dart

notification_service.dart

AndroidManifest.xml

IKINDU
23 May, 2025, 11:19

Resource files for push notification icon

❯ tree android/app/src/main/res/ android/app/src/main/res/ β”œβ”€β”€ drawable β”‚Β Β  β”œβ”€β”€ background.png β”‚Β Β  β”œβ”€β”€ ic_stat_notification.png β”‚Β Β  └── launch_background.xml β”œβ”€β”€ drawable-hdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  β”œβ”€β”€ ic_stat_notification.png β”‚Β Β  └── splash.png β”œβ”€β”€ drawable-mdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  β”œβ”€β”€ ic_stat_notification.png β”‚Β Β  └── splash.png β”œβ”€β”€ drawable-night-hdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  └── ic_stat_notification.png β”œβ”€β”€ drawable-night-mdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  └── ic_stat_notification.png β”œβ”€β”€ drawable-night-xhdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  └── ic_stat_notification.png β”œβ”€β”€ drawable-night-xxhdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  └── ic_stat_notification.png β”œβ”€β”€ drawable-night-xxxhdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  └── ic_stat_notification.png β”œβ”€β”€ drawable-v21 β”‚Β Β  β”œβ”€β”€ background.png β”‚Β Β  └── launch_background.xml β”œβ”€β”€ drawable-xhdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  β”œβ”€β”€ ic_stat_notification.png β”‚Β Β  └── splash.png β”œβ”€β”€ drawable-xxhdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  β”œβ”€β”€ ic_stat_notification.png β”‚Β Β  └── splash.png β”œβ”€β”€ drawable-xxxhdpi β”‚Β Β  β”œβ”€β”€ android12splash.png β”‚Β Β  β”œβ”€β”€ ic_stat_notification.png β”‚Β Β  └── splash.png β”œβ”€β”€ mipmap-hdpi β”‚Β Β  β”œβ”€β”€ ic_launcher.png β”‚Β Β  └── launcher_icon.png β”œβ”€β”€ mipmap-mdpi β”‚Β Β  β”œβ”€β”€ ic_launcher.png β”‚Β Β  └── launcher_icon.png β”œβ”€β”€ mipmap-xhdpi β”‚Β Β  β”œβ”€β”€ ic_launcher.png β”‚Β Β  └── launcher_icon.png β”œβ”€β”€ mipmap-xxhdpi β”‚Β Β  β”œβ”€β”€ ic_launcher.png β”‚Β Β  └── launcher_icon.png β”œβ”€β”€ mipmap-xxxhdpi β”‚Β Β  β”œβ”€β”€ ic_launcher.png β”‚Β Β  └── launcher_icon.png β”œβ”€β”€ raw β”‚Β Β  β”œβ”€β”€ keep.xml β”‚Β Β  └── notification_sound.wav β”œβ”€β”€ values β”‚Β Β  └── styles.xml β”œβ”€β”€ values-night β”‚Β Β  └── styles.xml β”œβ”€β”€ values-night-v31 β”‚Β Β  └── styles.xml └── values-v31 └── styles.xml

23 directories, 46 files

IKINDU
23 May, 2025, 11:20

Logs:

Darshan Pandya
23 May, 2025, 12:01

this doesn't really give the logs or any specific info of the ANR due to push notifications. Could be related to FCM and not Appwrite.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more