[firebase_messaging]: Double Notifications in Firebase onMessage Listener #13479
Labels
Needs Attention
This issue needs maintainer attention.
resolution: duplicate
This issue or pull request already exists
type: bug
Something isn't working
Is there an existing issue for this?
Which plugins are affected?
Messaging
Which platforms are affected?
iOS
Description
I’m experiencing an issue where double notifications are being triggered in my Flutter app when using Firebase Cloud Messaging (FCM). This happens when handling the FirebaseMessaging.onMessage listener. Specifically, the issue occurs in the following scenario:
1 - Foreground: When the app is open, I’m manually displaying the notification using onMessage. However, the notification is being shown twice.
2 - Background: When the app is in the background, only one notification is shown, as expected.
my code :
Reproducing the issue
Firebase Core version
3.6.0
Flutter Version
3.24.1
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippetReplace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
firebase_core: ^3.6.0
firebase_messaging: ^15.1.3
The text was updated successfully, but these errors were encountered: