In a recent update we began seeing 2 crashes coming from Firebase. Neither of these crashes are reproducible, and they happen pretty infrequently, but frequently enough for us to be concerned. The first one appear 99% of the time on Android 7 (1% on Android 5):
Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in com.google.firebase.iid.f#96947cd
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1132)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
at com.google.firebase.iid.zzad.zzchp(Unknown Source)
at com.google.firebase.iid.zzae.onReceive(Unknown Source)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1122)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
And this one comes exclusively from Android 8:
Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in com.google.firebase.iid.f#8746d6a
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52497(LoadedApk.java:1323)
at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.$m$7(Unknown Source:4)
at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.run(Unknown Source:39)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
at com.google.firebase.iid.zzad.zzchp(Unknown Source:24)
at com.google.firebase.iid.zzae.onReceive(Unknown Source:7)
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52497(LoadedApk.java:1313)
at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.$m$7(Unknown Source:4)
at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.run(Unknown Source:39)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Unfortunately the Firebase SDK is obfuscated so I can't see the full context of the crash, but the exception being thrown is an NPE on a NetworkInfo object trying to perform the isConnected method.
These are the firebase libs we are using in this build:
api "com.google.firebase:firebase-config:11.6.2"
api "com.firebase:firebase-jobdispatcher:0.8.4"
We upgraded the firebase-config lib from 11.2.0 to 11.6.2 and added the jobdispatcher lib between the previous release and this new release where we began seeing the crash. I've searched around but haven't seen any existing conversations about the issue, if anyone has insight we'd really appreciate it. Thanks!
I got an official answer from the firebase team to the bug report I sent concerning this issue:
Yes, you are right. This is currently an issue from Firebase SDK 11.6.0 onwards.
Our engineers are currently working on a fix for this issue, but I can't share any details or timelines at this time.
In the meantime, I would suggest you to use the older version of the Firebase SDK.
You may check our release notes for any further updates.
Had same issue. Fixed in Firebase SDK 11.8.0.
Also checked the release notes:
SDK Version 11.8.0 - December 18, 2017
Cloud Messaging
Fixed an internal NullPointerException caused by a call to NetworkInfo.isConnected().
Related
My app has in-app purchases. I use the billing library:
def billing_version = "4.1.0"
implementation("com.android.billingclient:billing:$billing_version")
implementation("com.android.billingclient:billing-ktx:$billing_version")
I observe in Firebase, that user with LG Nexus 5X (Android 8.1) can't make the purchase. He tried several times, but gets the same problem:
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{studio.yatoo.calendarwidget/com.android.billingclient.api.ProxyBillingActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.app.PendingIntent.getIntentSender()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.IntentSender android.app.PendingIntent.getIntentSender()' on a null object reference
at com.android.billingclient.api.ProxyBillingActivity.onCreate(com.android.billingclient:billing##4.1.0:11)
at android.app.Activity.performCreate(Activity.java:7009)
at android.app.Activity.performCreate(Activity.java:7000)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
All other users have no such problem. Only user with LG Nexus 5X. Could somebody help, how to solve this problem?
As I stated in my comment below the question, I get the feeling this is safe to ignore. My app is relatively niche, and the probability of someone with a device this old, with this OS version, making a purchase so soon is almost zero. I wish Google would be more explicit about their automated testing devices, as I've wasted time chasing similar, seemingly impossible bugs before, but this smells like it's safe to ignore (with caution).
Is anyone receiving this runtime exception?
java.lang.IllegalArgumentException: No enum constant com.facebook.appevents.codeless.internal.EventBinding.MappingMethod.BUTTON_INDEXING
at java.lang.Enum.valueOf(Enum.java:257)
at com.facebook.appevents.codeless.internal.EventBinding$MappingMethod.valueOf(EventBinding.java:154)
at com.facebook.appevents.codeless.internal.EventBinding.getInstanceFromJson(EventBinding.java:82)
at com.facebook.appevents.codeless.internal.EventBinding.parseArray(EventBinding.java:69)
at com.facebook.appevents.codeless.CodelessMatcher$ViewMatcher.run(CodelessMatcher.java:224)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
We are using implementation 'com.facebook.android:facebook-android-sdk:4.37.0'
I've tried the newest version 4.39.0, but it also doesn't work. For some reason 4.33.0, however, does work. The issue started at around 8pm UTC
I have an app with 100.000+ users and since Android 7 begun rolling out this stacktrace have begun showing up (only reported for Android 7.0). I use Ti SDK 5.5.1
It's being reported for: ti.modules.titanium.android.TiJSService.start
java.lang.RuntimeException:
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3495)
at android.app.ActivityThread.-wrap23(ActivityThread.java:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1674)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6524)
at java.lang.reflect.Method.invoke(Native Method:0)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
Caused by: java.lang.NullPointerException:
at org.appcelerator.kroll.KrollProxy.getKrollObject(KrollProxy.java:450)
at org.appcelerator.kroll.KrollProxy.hasListeners(KrollProxy.java:948)
at org.appcelerator.kroll.KrollProxy.hierarchyHasListener(KrollProxy.java:956)
at org.appcelerator.kroll.KrollProxy.fireEvent(KrollProxy.java:752)
at ti.modules.titanium.android.TiJSService.start(TiJSService.java:96)
at ti.modules.titanium.android.TiJSService.onStartCommand(TiJSService.java:47)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3476)
Anyone who can point in any direction? I'm kinda lost as to the cause of this.
I have setup AerisDemo android application found on this link in android studio. I am using google play services latest version. When I run the app, it works perfectly until I click on "Interactive Maps" option, the app crashes. Below is the error:
java.lang.NullPointerException: Attempt to invoke virtual method 'com.hamweather.aeris.tiles.AerisTile com.hamweather.aeris.maps.AerisMapOptions.getTile()' on a null object reference
at com.example.fragment.MapFragment.initMap(MapFragment.java:166)
at com.example.fragment.MapFragment.onActivityCreated(MapFragment.java:102)
at android.app.Fragment.performActivityCreated(Fragment.java:2072)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:912)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.app.BackStackRecord.run(BackStackRecord.java:846)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1473)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:447)
at android.os.Handler.handleCallback(Handler.java:810)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5528)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
Can anyone help me solve this issue?
Thanks.
I use a realm database in my android project.
I've added a new column to my realm db which I generate out of a CSV and did the same in my entity file.
However, I now get a RealmMigrationNeededException if I start my app although I have uninstalled it before. So it seems like if my generated database and the entity file don't match.
I would like to know if it's possible to find out what exactly causes the exception. The stacktrace I get in Android Studio doesn't contain any clues which might help me to resolve the issue
FATAL EXCEPTION: main
Process: de.myCompany.myApp, PID: 5270
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in de.myCompany.myApp.helper.WifiReceiver#2d683f50
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:872)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
Caused by: io.realm.exceptions.RealmMigrationNeededException: RealmMigration must be provided
at io.realm.BaseRealm.migrateRealm(BaseRealm.java:589)
at io.realm.Realm.migrateRealm(Realm.java:1224)
at io.realm.Realm.migrateRealm(Realm.java:1213)
at io.realm.Realm.createInstance(Realm.java:237)
at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:114)
at io.realm.Realm.getInstance(Realm.java:197)
at de.myCompany.myApp.ImageDownloadController.fillDownloadStack(ImageDownloadController.java:94)
at de.myCompany.myApp.ImageDownloadController.<init>(ImageDownloadController.java:37)
at de.myCompany.myApp.ImageDownloadController.getInstance(ImageDownloadController.java:42)
at de.myCompany.myApp.helper.WifiReceiver.onReceive(WifiReceiver.java:30)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:862)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
Is there any proper way to debug a RealmMigrationNeededException except for trial and error?
If a RealmMigrationExceptionNeeded error happens, Realm automatically tries to trigger any configured migration to fix it. If no such RealmMigration exists, you instead get another RealmMigrationNeededException that overrides the underlying cause.
The fix is to just provide a dummy RealmMigration to see the real error.
I can see why it can be a bit confusing, and we should probably consider throwing a better exception message that also include the underlying cause.