Android : Firebase - Failed to Initialize crash reporting

13,304 views
Skip to first unread message

Kumar Vivek

unread,
May 23, 2016, 9:30:47 AM5/23/16
to Firebase Google Group
Hello

I have recently started building android app on firebase platform, but i am facing an issue with Crash Reporting (Which is in BETA now).

I followed as instructed in the doc, and added the gradle dependency for crash reporting, also I have added Firebase SDK and JSON data of Google Services in my project.

But I am getting this error in Logcat:

05-23 17:41:34.964 3380-3380/com.phoenixapplabs.myjobber E/FirebaseCrash: Failed to initialize crash reporting
                                                                          com.google.firebase.crash.internal.zzg$zza: com.google.android.gms.internal.zzqi$zza: No acceptable module found. Local version is 0 and remote version is 0.
                                                                              at com.google.firebase.crash.internal.zzg.zzah(Unknown Source)
                                                                              at com.google.firebase.crash.FirebaseCrash.<init>(Unknown Source)
                                                                              at com.google.firebase.crash.FirebaseCrash.getInstance(Unknown Source)
                                                                              at java.lang.reflect.Method.invokeNative(Native Method)
                                                                              at java.lang.reflect.Method.invoke(Method.java:515)
                                                                              at com.google.firebase.FirebaseApp.zza(Unknown Source)
                                                                              at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                                              at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                                                              at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
                                                                              at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
                                                                              at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
                                                                              at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
                                                                              at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
                                                                              at android.app.ActivityThread.installProvider(ActivityThread.java:5026)
                                                                              at android.app.ActivityThread.installContentProviders(ActivityThread.java:4621)
                                                                              at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4561)
                                                                              at android.app.ActivityThread.access$1500(ActivityThread.java:139)
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1353)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                              at android.os.Looper.loop(Looper.java:149)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5257)
                                                                              at java.lang.reflect.Method.invokeNative(Native Method)
                                                                              at java.lang.reflect.Method.invoke(Method.java:515)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
                                                                              at dalvik.system.NativeStart.main(Native Method)
                                                                           Caused by: com.google.android.gms.internal.zzqi$zza: No acceptable module found. Local version is 0 and remote version is 0.
                                                                              at com.google.android.gms.internal.zzqi.zza(Unknown Source)
                                                                              at com.google.firebase.crash.internal.zzg.zzah(Unknown Source) 
                                                                              at com.google.firebase.crash.FirebaseCrash.<init>(Unknown Source) 
                                                                              at com.google.firebase.crash.FirebaseCrash.getInstance(Unknown Source) 
                                                                              at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                              at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                              at com.google.firebase.FirebaseApp.zza(Unknown Source) 
                                                                              at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                                              at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                                                              at com.google.firebase.FirebaseApp.zzbu(Unknown Source) 
                                                                              at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) 
                                                                              at android.content.ContentProvider.attachInfo(ContentProvider.java:1591) 
                                                                              at android.content.ContentProvider.attachInfo(ContentProvider.java:1562) 
                                                                              at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) 
                                                                              at android.app.ActivityThread.installProvider(ActivityThread.java:5026) 
                                                                              at android.app.ActivityThread.installContentProviders(ActivityThread.java:4621) 
                                                                              at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4561) 
                                                                              at android.app.ActivityThread.access$1500(ActivityThread.java:139) 
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1353) 
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                              at android.os.Looper.loop(Looper.java:149) 
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5257) 
                                                                              at java.lang.reflect.Method.invokeNative(Native Method) 
                                                                              at java.lang.reflect.Method.invoke(Method.java:515) 
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 
                                                                              at dalvik.system.NativeStart.main(Native Method) 
05-23 17:41:34.964 3380-3380/com.phoenixapplabs.myjobber D/FirebaseApp: Initialized class com.google.firebase.crash.FirebaseCrash.


That is "FAILED TO INITIALIZE CRASH REPORTING"... Am I missing something?

I am successfully able to send the data to FIREBASE REALTIME DATABASE, so I guess I have configured the SDK fine.

Any help is highly appreciated, Thanks a lot.

Kato Richardson

unread,
May 23, 2016, 11:56:14 AM5/23/16
to Firebase Google Group
Hi Kumar!

Have you turned crash reporting on in your console? If so, you should probably reach out to support.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/c4c8a14a-a666-416d-bdd8-7304555c7939%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Dale King

unread,
May 23, 2016, 6:56:30 PM5/23/16
to Firebase Google Group
I'm getting the same error

Ian Barber

unread,
May 23, 2016, 7:54:10 PM5/23/16
to Firebase Google Group
This looks very much like its running on an older version of Google Play Services. Firebase needs Google Play services 9.0+ on the device in order to work. Which version are you running? 

Doug Stevenson

unread,
May 24, 2016, 2:42:40 PM5/24/16
to Firebase Google Group
Also, it's worth mentioning that Crash Reporting won't initialize in Android emulators that:

- Don't have "Google APIs" (Play Services) installed.  Be sure to choose an image with Google APIs.
- Have an old Play Services (prior to version 9.0.0).

Today, it looks like the emulator images for API level 22 and 23 that include Google APIs have a 9.0+ Play Services, so that should work OK.  Be sure that you have revision 14 of the "Google APIs Intel x86 Atom System Image" for API level 23, or revision 7 of the x86 image for API level 22.

Doug

Dale King

unread,
May 24, 2016, 3:24:51 PM5/24/16
to Firebase Google Group
That appears to be the issue with mine. I switched to my phone and that error went away. I still cannot get it to report crashes from our app, but I can from the quickstart sample app. Doesn't report any errors and it shows that FirebaseCrash caught the error, but I don't see it being sent in the log and it never shows up on the server.

Doug Stevenson

unread,
May 24, 2016, 5:08:05 PM5/24/16
to Firebase Google Group
Currently there is a delay of about 20 minutes from the time of the crash to the moment it appears in the dashboard.  We're working on improving this.

If you're still not seeing the crash in the console, check logcat to see if there is a message that confirms the crash was sent.  It should try to send immediately, but if it can't for some reason, it should retry.  Also try relaunching the app to stimulate a retransmission.

Joshua Frank

unread,
May 24, 2016, 6:27:42 PM5/24/16
to Firebase Google Group
I getting this issue just connecting to the Firebase database. 

DatabaseReference myFirebaseRef = FirebaseDatabase.getInstance().getReferenceFromUrl(Constants.FIREBASE_BACKGROUNDS_URL);
throws
Caused by: java.lang.RuntimeException: com.google.android.gms.internal.zzqi$zza: No acceptable module found. Local version is 0 and remote version is 0.

It's only happening on an older Gingerbread phone. Android OS 2.3.6. On my newer test devices I'm not having any issues.

Dale King

unread,
May 24, 2016, 8:11:33 PM5/24/16
to fireba...@googlegroups.com
I know about the delay, but no they did not show up days later and there is nothing in the log about them being sent or an error explaining that they weren't sent. I am still working on it. Here is the redacted log from our app filtered to Firebase messages:

05-23 23:49:42.211 13935-13935/com.XXXXX.app.debug D/FirebaseCrashApiImpl: throwable java.lang.RuntimeException: Unable to start activity ComponentInfo{com.XXXXX.app.debug/com.XXXXX.app.ui.logbook.LogbookListActivity}: android.view.InflateException: Binary XML file line #4: Error inflating class fragment
05-23 23:49:56.963 17975-17975/com.XXXXX.app.debug D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
05-23 23:49:56.984 17975-17975/com.XXXXX.app.debug D/FirebaseApp: Initialized class com.google.firebase.iid.FirebaseInstanceId.
05-23 23:49:57.432 17975-17975/com.XXXXX.app.debug I/FirebaseCrashApiImpl: FirebaseCrashApiImpl created by ClassLoader com.google.android.chimera.container.internal.DelegateLastPathClassLoader[DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/00000002/DynamiteModulesC_GmsCore_prodlmp_xxhdpi_release.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]]
05-23 23:49:57.530 17975-17975/com.XXXXX.app.debug D/FirebaseCrashApiImpl: FirebaseCrash reporting API initialized
05-23 23:49:57.531 17975-17975/com.XXXXX.app.debug I/FirebaseCrash: FirebaseCrash reporting initialized com.google.firebase.crash.internal.zzg@3d259ed1
05-23 23:49:57.531 17975-17975/com.XXXXX.app.debug D/FirebaseApp: Initialized class com.google.firebase.crash.FirebaseCrash.
05-23 23:49:57.612 17975-17975/com.XXXXX.app.debug D/FirebaseApp: Initialized class com.google.android.gms.measurement.AppMeasurement.
05-23 23:50:15.208 17975-17975/com.XXXXX.app.debug D/FirebaseCrashApiImpl: throwable java.lang.RuntimeException: Unable to start activity ComponentInfo{com.XXXXX.app.debug/com.XXXXX.app.ui.logbook.LogbookListActivity}: android.view.InflateException: Binary XML file line #4: Error inflating class fragment


--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/QDaAHIH3vzQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Dale King

Joshua Frank

unread,
May 25, 2016, 5:15:22 PM5/25/16
to Firebase Google Group
I was able to resolve this for the realtime database by checking for Google Play Services before accessing the database. Like this:

//Check if google play services is up to date
final int playServicesStatus = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(activity);
if(playServicesStatus != ConnectionResult.SUCCESS){
    //If google play services in not available show an error dialog and return
    final Dialog errorDialog = GoogleApiAvailability.getInstance().getErrorDialog(activity, playServicesStatus, 0, null);
    errorDialog.show();
    return;
}


Since crash report loads from a content provider that is initialized even before the application context. I don't know what you can do about that. The folks at Firebase will have to add a check into the sdk directly. For now I would say that crash reporting is a non starter. Too many phones will have out of date Play services. With no way to prompt the user about the problem the 1 star reviews will flood in.

Dale King

unread,
May 25, 2016, 8:23:07 PM5/25/16
to Firebase Google Group
But it doesn't crash in that case, you just won't get crash reports

Dale King

unread,
May 26, 2016, 1:26:29 AM5/26/16
to Firebase Google Group
Took a couple days of tracking down, but I finally have the answer why our app was not sending crash reports. Nearly 2 years ago someone added to the application element in the AndroidManifest an atribute of the form:

     tools:node="replace"

You can read about the meaning of this here: http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger#TOC-tools:node-markers, but it means that it did not allow anything to be merged to that application element during manifest merger. This meas that the services needed for receiving and sending crash reports to Firebase were not merged into the manifest and thus never got initialized.

sanchit gupta

unread,
Aug 13, 2016, 3:26:02 PM8/13/16
to Firebase Google Group
Does this mean it will not work if google play version on user device is out of data.
FYI - I was also getting this error and once play server version was updated it worked.
Reply all
Reply to author
Forward
0 new messages