firebase_messaging: We are experiencing an application crash on iOS when a remote notification is received.
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- backend-api-design, mobile
Research direction
Start by inspecting FLTFirebaseMessagingPlugin.m around line 518 and the application:didReceiveRemoteNotification:fetchCompletionHandler: callback, then trace how PushKit notifications reach it. The report lacks a complete dependency list and a minimal reproduction, so first compare the crash path with the plugin’s iOS notification handling and identify the failing message dispatch. Done means reproducing or isolating the crash and confirming a safe callback path with a regression test.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues.
Which plugins are affected?
No response
Which platforms are affected?
iOS
Description
[REQUIRED] Environment info
firebase-tools: Not applicable (Issue related to Firebase Messaging Flutter plugin).
Platform: iOS (Flutter application)
Firebase Messaging: firebase_messaging 15.0.4
Flutter version: 3.44.3
iOS version: 27.0.1
[REQUIRED] Test case
We are experiencing an application crash on iOS when a remote notification is received.
The crash occurs on the main thread inside the Firebase Messaging Flutter plugin, specifically in the following method:
-[FLTFirebaseMessagingPlugin application:didReceiveRemoteNotification:fetchCompletionHandler:]
The crash stack trace indicates that the failure occurs while UIKit/PushKit is processing an incoming remote notification payload.
[REQUIRED] Actual behavior
The application crashes on the iOS main thread while processing an incoming remote notification.
The crash occurs inside the Firebase Messaging plugin at:
FLTFirebaseMessagingPlugin.m:518
The top-level exception points to objc_msgSend, suggesting that an Objective-C message dispatch is failing during notification processing.
This issue appears to involve the interaction between Firebase Messaging and PushKit notification handling.
We would appreciate help identifying the root cause and understanding whether this is a known issue with Firebase Messaging's iOS notification handling.
Reproducing the issue
[REQUIRED] Steps to reproduce
Integrate Firebase Messaging into a Flutter iOS application.
Configure remote push notification handling.
Send or receive a remote notification through the configured PushKit/notification flow.
When iOS invokes the remote notification callback, the application occasionally crashes on the main thread.
Crash logs consistently point to FLTFirebaseMessagingPlugin.m, specifically the application:didReceiveRemoteNotification:fetchCompletionHandler: method.
[REQUIRED] Expected behavior
Firebase Messaging should safely handle incoming remote notification payloads without causing an application crash.
The notification callback should complete successfully, and the application should continue running normally.
Firebase Core version
3.3.0
Flutter Version
3.44.3
Relevant Log Output
Crashed: com.apple.main-thread
0 libobjcMsgSend.dylib
objc_msgSend + 8
1 Runner
-[FLTFirebaseMessagingPlugin application:didReceiveRemoteNotification:fetchCompletionHandler:]
+ 518 (FLTFirebaseMessagingPlugin.m:518)
2 UIKitCore
-[UIApplication pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler:]
3 PushKit
-[PKPushRegistry remoteUserNotificationPayloadReceived:completionHandler:]
Flutter dependencies
Expand Flutter dependencies snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
- Dominant language
- Dart
- Stars
- 9.3k
- Forks
- 4.1k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 78
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/flutterfire
-
🚀 [firebase_core] Bump Firebase C++ SDK (14.1.0 → 14.2.0)Possibly taken @SelaseKay claimed this today. OpenNeeds Attention type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
firebase/flutterfire#18977 · 1 comment ·
Maintainers usually reply within 1 day
-
[firebase_core_web]: Firebase.initializeApp never completes when a Firebase JS SDK script fails to loadPossibly taken @LasseLegarth claimed this 5 days ago. OpenNeeds Attention platform: web plugin: core reproduced type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
firebase/flutterfire#18964 · 1 comment ·
Maintainers usually reply within 1 day
-
Needs Attention platform: android plugin: crashlytics type: enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
firebase/flutterfire#18951 · 2 comments ·
Maintainers usually reply within 1 day
-
blocked: external dependency platform: web plugin: ai type: bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
firebase/flutterfire#18938 · 2 comments ·
Maintainers usually reply within 1 day
-
[cloud_firestore][Windows] Invalid field names (empty or `__x__`) close the app instead of throwing a FirebaseExceptionPossibly taken @SelaseKay claimed this 6 days ago. OpenNeeds Attention platform: windows plugin: cloud_firestore reproduced type: bug type: crash
Difficulty 4/5 3-5 days Newbie friendliness 52/100
firebase/flutterfire#18928 · 1 comment ·
Maintainers usually reply within 1 day
All issues in firebase/flutterfire
Similar issues
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
StabilityNexus/Zplit#77 · 1 comment ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
agent: is checked on a wrapper holding several checkables answers from the first one in tree orderOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AlphaWaveSystems/flutter-probe#865 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ubuntu/app-center#2306 ·
Maintainers usually reply within 1 day