Quickstart-unity: Firebase crash when resume app from background in Android

Created on 30 Nov 2016  Â·  8Comments  Â·  Source: firebase/quickstart-unity

Hi,
I have used Firebase for my game.
When i press home button, and open again game, my game crash,
and i also log error:

E/AndroidRuntime: FATAL EXCEPTION: IntentService[FIREBASE_MSG_FWDR]
java.lang.Error: FATAL EXCEPTION [IntentService[FIREBASE_MSG_FWDR]]
Unity version : 5.4.3f1
Device model : samsung Galaxy Nexus

                                             Caused by: java.lang.NullPointerException
                                                 at com.google.firebase.messaging.RemoteMessage.getFrom(Unknown Source)
                                                 at com.google.firebase.messaging.cpp.ListenerService.onMessageReceived(ListenerService.java:59)
                                                 at com.google.firebase.messaging.MessageForwardingService.onHandleIntent(MessageForwardingService.java:34)
                                                 at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
                                                 at android.os.Handler.dispatchMessage(Handler.java:99)
                                                 at android.os.Looper.loop(Looper.java:137)
                                                 at android.os.HandlerThread.run(HandlerThread.java:60)
duplicate

All 8 comments

This is a cross post of the issue reported on
https://groups.google.com/d/msg/firebase-talk/rqWZ2frS_VY/ISNmhzfFAwAJ

On Tue, Nov 29, 2016 at 11:19 PM, NhamPhanDinh notifications@github.com
wrote:

Hi,
I have used Firebase for my game.
When i press home button, and open again game, my game crash,
and i also log error:

E/AndroidRuntime: FATAL EXCEPTION: IntentService[FIREBASE_MSG_FWDR]
java.lang.Error: FATAL EXCEPTION [IntentService[FIREBASE_MSG_FWDR]]
Unity version : 5.4.3f1
Device model : samsung Galaxy Nexus

                                         Caused by: java.lang.NullPointerException
                                             at com.google.firebase.messaging.RemoteMessage.getFrom(Unknown Source)
                                             at com.google.firebase.messaging.cpp.ListenerService.onMessageReceived(ListenerService.java:59)
                                             at com.google.firebase.messaging.MessageForwardingService.onHandleIntent(MessageForwardingService.java:34)
                                             at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
                                             at android.os.Handler.dispatchMessage(Handler.java:99)
                                             at android.os.Looper.loop(Looper.java:137)
                                             at android.os.HandlerThread.run(HandlerThread.java:60)

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-unity/issues/18, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AFw1RBnQ2XjnErS4Qg0RL2k10jZqQhb7ks5rDSNkgaJpZM4K_4RW
.

I also get this bug on Android device.How to fix this issue?

Haha, i thing wait developer of FIrebase fix it in next release, i'm also hope they can release early

Thank you.Maybe just wait the next social release.

Hello NhamPhanDinh!Do you get that issue ?In the Unity game,when I use SceneManager.LoadSceneAsync("MenuScene") then I can't receive the message data from OnMessageReceived in the appliocation.But can also receive push notifiction on the mobile device list.

I'm pleased to announce that we released:

  • Firebase C++ SDK 2.1.0 (release notes here, download here)
  • Firebase Unity SDK 1.1.0 (release notes here, download here)

I believe this should resolve your issue. If not, please let us know and we'll take a look.

Cheers,
Stewart

@stewartmiles yeah.Thank you for having solved the two issues.Now I have found the other issue that I can't receive the fcm push notification when EXIT the game,only receive fcm push notification when the unity app is active.

See https://github.com/firebase/quickstart-unity/issues/25

On Mon, Dec 12, 2016 at 12:19 AM, BuKuSiShen notifications@github.com
wrote:

@stewartmiles https://github.com/stewartmiles yeah.Thank you for having
solved the two issues.Now I have found the other issue that I can't receive
the fcm push notification when EXIT the game,only receive fcm push
notification when the unity app is active.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-unity/issues/18#issuecomment-266368035,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFw1RHvxEqlN-LxMMMuldd1uF3Y034keks5rHQOlgaJpZM4K_4RW
.

Was this page helpful?
0 / 5 - 0 ratings