firebase / quickstart-android

Firebase Quickstart Samples for Android
https://firebase.google.com
Apache License 2.0
8.87k stars 7.34k forks source link

Failed to initialize crash reporting #483

Closed pesehr closed 6 years ago

pesehr commented 6 years ago

HI, I'm facing this type of issue. Could you help me resolve the problem?

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActivityManager.getMemoryInfo(android.app.ActivityManager$MemoryInfo)' on a null object reference at bgh.<init>(:com.google.android.gms.dynamite_dynamitemodulesc@12529020@12.5.29 (040308-192802242):29) at com.google.firebase.crash.internal.api.FirebaseCrashApiImpl.init(:com.google.android.gms.dynamite_dynamitemodulesc@12529020@12.5.29 (040308-192802242):12) at bfv.onTransact(:com.google.android.gms.dynamite_dynamitemodulesc@12529020@12.5.29 (040308-192802242):22) at android.os.Binder.transact(Binder.java:507) at com.google.android.gms.internal.measurement.zzn.transactAndReadExceptionReturnVoid(Unknown Source) at com.google.android.gms.internal.measurement.zzxa.zza(Unknown Source) at com.google.firebase.crash.zze.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:762) 04-30 12:36:17.333 17645-17667/ir.ba24.key E/FirebaseCrash: Failed waiting for crash api to load. java.lang.InterruptedException at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1036) at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1327) at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:249) at com.google.firebase.crash.FirebaseCrash.zzrl(Unknown Source) at com.google.firebase.crash.FirebaseCrash.zza(Unknown Source) at com.google.firebase.crash.zza.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:762)

Step 2: Describe your environment

samtstern commented 6 years ago

@pesehr thanks for reporting this. Can you reproduce this issue locally or is this something your users are seeing?

Also can you confirm what version of Google Play services is installed on the Samsung Galaxy S6 device?

pesehr commented 6 years ago

@samtstern thanks for your response. Yes, I can reproduce it. The version of Google play services on my device is: 12.5.29

samtstern commented 6 years ago

@pesehr can you show the minimal amount of code needed to reproduce it on that device?

pesehr commented 6 years ago

@samtstern No, when I launch the app after a crash, I see this error. the crash is not reported on Fabric/Crashlytics console either.

samtstern commented 6 years ago

Ok so the sequence of events is:

1) See a crash 2) Launch the app again 3) Get this error in the logcat

Does this cause the app to crash or is this just reported in the logs?

pesehr commented 6 years ago

this just reported in the logs.

samtstern commented 6 years ago

@pesehr thank you, good to know it's not fatal. We'll try to reproduce and then forward it on to the crash reporting engineering team.

By the way, you might want to consider moving to Crashlytics: https://firebase.google.com/docs/crashlytics/upgrade-from-crash-reporting

It's the best option going forward and the migration is really simple.

pesehr commented 6 years ago

@samtstern thank you. Actually, I use Crashlytics now but it doesn't report crashes so I thought maybe it's related to this error.

Update: I get the crash reports. the problem is not relevant to the issue.

samtstern commented 6 years ago

@pesehr I apologize for not responding, did you get Crashlytics to work?

pesehr commented 6 years ago

@samtstern yes, that's my fault. but I still get the reported error :(

samtstern commented 6 years ago

Could you show your dependencies block for me?

samtstern commented 6 years ago

@pesehr I hope you solved this problem! Closing this issue because it's an old thread with no recent responses. If you are still seeing this, please let me know and I will re-open it.

kvenkatesh-nyros commented 5 years ago

i got same issue