Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[firebase_messaging]: FirebaseMessaging.onMessage not received any data

Open
#18,776 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
dart, firebase, flutter

Research direction

Start by checking the firebase_messaging iOS implementation around FLTFirebaseMessagingPlugin.configureNotificationCenterDelegate() and how foreground messages reach FirebaseMessaging.onMessage. Reproduce the report on an iOS simulator using the provided notification and data payload, then compare behavior with the banner presentation options. Done means identifying why the foreground callback receives no data and confirming the expected behavior with a focused regression test.

Written by the indexing model from the issue text.

Description

blocked: customer-response Needs Attention platform: ios plugin: messaging type: bug
Is there an existing issue for this?
  • I have searched the existing issues.
Are you aware of the differences between iOS and Android background message handling?
  • I understand that iOS and Android background messages behave differently, and I've designed my application with that in mind.
Do you have an active Apple Developer account?
  • I have an active Apple Developer account.
Are you using a physical iOS device to test background messages?
  • I am using a physical iOS device to test background messages.
Have you enabled "Remote Notifications" & "Background Mode" (Checking options for "Background Processing" & "Remote Notifications") in your app's Xcode project?

iOS simulator issues
FirebaseMessaging.onMessage not working

version firebase_messaging: ^16.7.0
added FLTFirebaseMessagingPlugin.configureNotificationCenterDelegate()

Have you created an APNs key in your Apple Developer account & uploaded this APNs key to your Firebase console?

yes

Have you disabled method swizzling for Firebase in your app?
<array>
	<string>UIInterfaceOrientationPortrait</string>
	<string>UIInterfaceOrientationPortraitUpsideDown</string>
	<string>UIInterfaceOrientationLandscapeLeft</string>
	<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>FirebaseAppDelegateProxyEnabled</key>
<true/>
Are you sending messages to your app from the Firebase Admin SDK?

{
message: {
token: token,
notification: {
title: notifTitle,
body: notifBody,
},
data: {
title: notifTitle,
body: notifBody,
thread_id: String(thread_id || ""),
type: String(type || "CHAT"),
//...data,
},
android: {
priority: "HIGH",
notification: {
title: notifTitle,
body: notifBody,
sound: "default",
channel_id: "bizcentre_omnichannel_channel",
notification_priority: "PRIORITY_MAX",
default_sound: true,
default_vibrate_timings: true,
visibility: "PUBLIC",
},
},
apns: {
headers: {
"apns-push-type": "alert",
"apns-priority": "10"
},
payload: {
aps: {
alert: {
title: notifTitle,
body: notifBody,
},
sound: "default",
badge: 1,
"content-available": 1,
'mutable-content': 1,
},
},
},
},
}

Have you requested permission from the user to receive notifications?
  • I have the relevant permission to receive notifications.
Have you used the 'Console' application on your macOS device to check if the iOS device's system is throttling your background messages?

the banner shown if set
await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(
alert: true,
badge: true,
sound: true,
);

Additional context and comments

No response

Dominant language
Dart
Stars
9.3k
Forks
4.1k
Avg merge
2d 18m
Merged PRs (30d)
34

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/flutterfire

All issues in firebase/flutterfire

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.