-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Firebase_messaging] : version 8.0.0-dev.7 unable to hit message handler functions. #4054
Comments
I have the above problems too with iOS real devices. |
Where have you defined the |
I can confirm that |
As onMessage is not Triggered as onMessageOpenedApp. |
It's not really clear here what is not working, Which one is not working, Can you confirm you are also testing this with a real device, this will not work on an iOS simulator. Can you also confirm APNs has been setup correctly in your project, iOS/macOS will not work at all without APNs - it must be configured. |
Hi Salakar,
As a workaround, which is probably a better solution than the original, I've used |
Correct - FCM will only ever work on a real device.
Could you explain specifically what doesn't work with
Could you clarify what steps you've taken to configure, have you followed the APNs integration guide; https://firebase.flutter.dev/docs/messaging/apple-integration and how are you sending your messages. |
I don't receive the Dart event. |
Ah interesting, can you show me this log. Also can you show me how you've setup the |
Not now because I'm quite busy, sorry. But I'll do it for sure as soon as I can. |
Ok, thanks. Could you also let me know the version of iOS your device is running when you can also. |
@Salakar My apologies for the late response. Im using a reald device ( IOS 14.1) I have firebase console setup and Im able to send messages with firebase console and cloud functions. However, when my app in background, messages are not hitting onBackgroundMessage
Outside my class Working for me
Not working
let me know if you need more information... |
Sorry for lack of information. In my case: Im testing on real devices: Android:
iOS:
I was using previous version 7.0.3 in production, everything works well. After migrating to 8.0.0-dev.7 something goes wrong on iOS side. As I'am sending notification from Firebase I can see in my logs, that all that data is corect but functions which I pass to onMessage and onMessageOpenedApp wont be triggered. I'll mention again that everything works on Android side. The problem only occurs when testing on iOS. Log print from console
Class with Notification
Let me know if you need any additional information. @Salakar |
I think I'd probably need to screenshare with someone as I still don't full understand where it's going wrong and I'd like to see the full environment/project setup. With FCM there's so many moving parts it's hard to get the complete picture down in a GitHub issue without going back and forth on replies forever 😅 Or if someone is able to add me to their project on git I can also look there (confidentially of course). |
I'm using 8.0.0-dev.8 and it doesn't work on iOS, but on 7.0.3 everything was okay. |
@Salakar I'm okay to schedule a zoom call and go through the project. |
@den-ree dropped you an email |
@Salakar replied, I'm planning to do testing on iOS 14.2. |
@Salakar no luck, I don't receive any notifications on iOS 14.2, tested on a real device. |
Hey guys! Some time passed since last update, did you manage to get your notification through your app? Thanks 🙏 |
This is on an iOS Device (14.4) - firebase_messaging 8.dev14 |
Which FB SDK version do you use? |
Hi just using the packages for the first time, after several hours, searching on this git issues, found that I was mistakenly sending the payload, thanks to #4300 :
From:
To:
This was preventing handlers to get notify, and after changing them, complete example from repo started working! Hope this helps any newcomer ! |
I have the same issue using firebase_messaging: 9.0.0. When sending a notification I see through logs that is received (firebase messaging logs show: broadcast received for message). But the functions onMessage(foreground) or onMessageOpenedApp(background) are never executed. Someone knows why? |
I have the similar issue when upgrading iOS app. I was using firebase_messaging: ^6.0.12 and i upgraded to firebase_messaging: ^9.0.0. In version 6.0.12 there is no foreground alert feature. I built foreground alert show with firebase local notification. Then I upgraded to 9.0.0 and added:
There is no problem when I first installed or built to iOS device. But when I upgraded older version to last test version of my app in TestFlight setForegroundNotificationPresentationOptions is not working. Alert is showing twice. First firebase messaging default alert, second alert from my functions with firebase local notification. Any solution for this case? |
Same issue here. |
@lucasalmeida-egsys I resolved my issue navigating to RemoteMessage.fromMap() and changing contentAvailable: map['contentAvailable'], to contentAvailable: map['contentAvailable']??false and mutableContent: map['mutableContent'], to mutableContent: map['mutableContent']??false |
solved, thanks. |
In my case, we can get background notifications on IOS real devices. But it does not invoke _firebaseMessagingBackgroundHandler which I use to do some tasks when the app receive a background notification.
firebase_messaging 8.0.0-dev.12 |
"7.3.0 - [Firebase/Messaging][I-FCM002022] APNS device token not set before retrieving FCM Token for Sender ID '708349719378'. Notifications to this FCM Token will not be delivered over APNS.Be sure to re-retrieve the FCM token once the APNS device token is set." |
Sorry a was forgetting await. Everything works on both side. |
Hi guys, I'm going to close this issue for now as we're on |
Im unable to hit the message handle functions when sending a notification from Firebase cloud messaging console.
I was able to send notifications with the new version deployment (8.0.0-dev.7) in IOS . I can see the notification in IOS physical device but when I click the notification I dont see the print logs Im setting in the message handler functions.
The text was updated successfully, but these errors were encountered: