quickstart-unity: [Question] Push notification messages are not displayed in the closed/background app on launch
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2020.3.10
- Firebase Unity SDK version: 8.1.0
- Source you installed the SDK: unitypackage
- Problematic Firebase Component: Messaging
- Other Firebase Components in use: Analytics, Deepliinks, Crashlytics,
- Additional SDKs you are using: Facebook, IronSource
- Platform you are using the Unity editor on Windows
- Platform you are targeting: Android
- Scripting Runtime: IL2CPP
[REQUIRED] Please describe the question here:
Push notification messages are not received in the app if the app is either closed or is in the background. The foreground app receives messages OK.
queued message 0:1628115171791201%bfe3fe3bbfe3fe3b
Firebase.AppUtilPINVOKE:PollCallbacks()
Firebase.AppUtil:PollCallbacks()
Firebase.Platform.FirebaseHandler:Update()
and
2021-08-10 00:14:38.207 23350-23465/com.threed_view.FluentWorldsDev E/Unity: Couldn't parse the message: Object reference not set to an instance of an object.
VIEW.VCT.Common.VCTLog:Error(String, String)
VIEW.VCT.Common.VCTLog:CatchLogs(String, String, LogType)
UnityEngine.LogCallback:Invoke(String, String, LogType)
VIEW.VCT.Common.MessagingService:OnMessageReceived(Object, MessageReceivedEventArgs)
System.EventHandler`1:Invoke(Object, TEventArgs)
Firebase.Messaging.<MessageReceivedDelegateMethod>c__AnonStorey0:<>m__0()
System.Func`1:Invoke()
Firebase.ExceptionAggregator:Wrap(Func`1, T)
Firebase.AppUtilPINVOKE:PollCallbacks()
Firebase.AppUtil:PollCallbacks()
Firebase.Platform.FirebaseHandler:Update()
2021-08-10 00:01:16.109 20990-21989/com.threed_view.FluentWorldsDev W/FirebaseMessaging: Missing Default Notification Channel metadata in AndroidManifest. Default value will be used.
So I guess I somehow missing on queued message handling when app is launched?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (4 by maintainers)
@equizo
I tried to reproduce it with the following configuration, but I can get the
OnMessageReceivedevent properly after I subscribe a topic, kill the app, send the message through Firebase console and click on the notification.2020.3.18f18.1.0Here is what I did after the app was deployed:
Subscribebutton.Here is a screenshot of the app for the second launch.
I would be great if you can help us to diagnose the issue with the following steps.
adb logcatwhen the issue occurs.8.0.0. Could you try to downgrade to7.2.0and see if the issue still occurs? Or FWIW, upgrade to8.2.0and see if anything changed. You should find all the.unitypackageyou need from this page (FCM, Crashlytics and Analytics)Appreciate it. Shawn