11

Does anyone knows about this crash?

Fatal Exception: java.lang.NullPointerException
       at com.google.firebase.messaging.FirebaseMessagingService.zzo(Unknown Source)
       at com.google.firebase.messaging.FirebaseMessagingService.zzn(Unknown Source)
       at com.google.firebase.messaging.FirebaseMessagingService.zzm(Unknown Source)
       at com.google.firebase.iid.zzb$2.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
       at java.lang.Thread.run(Thread.java:856)

It doesn't happen that much, about 0.1% of sessions.

Reported environments: GI-I9500_TMMARS / Android 4.1.1.

Sebastian Kim
  • 556
  • 1
  • 6
  • 15

3 Answers3

4

This problem is discussed as an issue for the Quick Start project. Comments there from the Firebase support team indicate the problem is fixed in SDK version 9.4.0. Are you building with that version?

Bob Snyder
  • 37,759
  • 6
  • 111
  • 158
  • Thanks for the info, but I use version 9.4.0. I will update if there's any updates on that threads. – Sebastian Kim Aug 25 '16 at 01:36
  • I am also on 9.4.0 and still get this issue. – spCoder Aug 26 '16 at 14:16
  • 2
    I am on 9.4.0 but faced this problem on exactly same device reported in the question: GI-I9500_TMMARS (Android 4.1.1) – rpattabi Sep 18 '16 at 23:01
  • @rpattabi i confirm same observation in one of my apps – abhishek Sep 21 '16 at 03:46
  • 2
    The latest conversation on that thread (and my own observation) indicates that 1) the bug is still present on version 9.6.1 and 2) this crash does not come from a real user in most cases (see http://stackoverflow.com/a/34942270/4834154). – Codiak Oct 06 '16 at 18:50
  • See my comment below to fix the solution on every version. – Guillaume agis Jan 06 '17 at 11:48
  • I am also getting this in device GI-I9500_TMMARS (4.1.1). I am using 10.0.1 – Tasneem Mar 03 '17 at 05:36
  • I can also confirm this issue in version 9.6.1 through a Crashlytics report. The device model is a "Batmobile - Defy Mini". Have not tested any newer version yet, since I don't know how to reproduce this. Up to know, only happend once in the last 2-3 months – b3nk4n Jun 27 '17 at 11:53
0

In my case i use wrong key to get value

Map data = remoteMessage.getData();
String name;
name = data.get("naem").toString());
//while correct key is name not naem
Zeeshan Ali
  • 2,211
  • 4
  • 18
  • 25
-1

In order to fix this error you should update firebase in your Gradle file and add the 2nd line:

compile 'com.google.firebase:firebase-messaging:10.0.1' 
compile 'com.google.firebase:firebase-core:10.0.1' // also need to add this line.

Getting a "Could not find" error? Make sure you have the latest Google Repository in the Android SDK manager

Don't forget to update the Gradle file in the root folder of your project as well otherwise you won't be able to get the version 10.0.1:

buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

source:

https://github.com/firebase/quickstart-android/issues/185 https://firebase.google.com/docs/android/setup

Guillaume agis
  • 3,756
  • 1
  • 20
  • 24