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.
Related
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().
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.
My app started crashing on my Android device. It used to work well and I did not change anything... I think it is related to Cordova but I have no clue why it suddenly started to crash.
Here is the log:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.meteor.webapp.AssetBundle.getVersion()' on a null object reference
at com.meteor.webapp.WebAppLocalServer.onReset(WebAppLocalServer.java:186)
at org.apache.cordova.PluginManager.onReset(PluginManager.java:465)
at org.apache.cordova.CordovaWebViewImpl$EngineClient.onPageStarted(CordovaWebViewImpl.java:502)
at org.apache.cordova.engine.SystemWebViewClient.onPageStarted(SystemWebViewClient.java:145)
at com.android.webview.chromium.WebViewContentsClientAdapter.onPageStarted(WebViewContentsClientAdapter.java:531)
at org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(AwContentsClientCallbackHelper.java:157)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5525)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Any idea?
Got crash from user's device (could not reproduce by myself) during sending SMS via smsManager.sendTextMessage
User's device is Sony Xperia Z2, Android 5.1.1
Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.content.pm.PackageInfo.packageName' on a null object reference
at android.os.Parcel.readException(Parcel.java:1562)
at android.os.Parcel.readException(Parcel.java:1505)
at com.android.internal.telephony.ISms$Stub$Proxy.sendTextForSubscriber(ISms.java:1306)
at android.telephony.SmsManager.sendTextMessage(SmsManager.java:270)
at com.xabber.android.ui.sms.SmsVerificationManager.requestPhoneNumberVerification(SmsVerificationManager.java:80)
at com.xabber.android.ui.RegistrationFragment1PhoneAndName.onNextPressed(RegistrationFragment1PhoneAndName.java:193)
at com.xabber.android.ui.RegistrationActivity.onClick(RegistrationActivity.java:122)
at android.view.View.performClick(View.java:4856)
at android.view.View$PerformClick.run(View.java:19956)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5373)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
SMS sending works excellent on my device and several others. Seems, that it is Android bug.
I could not find anything similar except for https://groups.google.com/forum/#!topic/automate-user/8gyfmMvPYDY
but they didn't solve it.
this my first post, I did an app in eclipse using google maps api v2. the app works fine in android 4.2.2 y 4.3 but in android 5.0 the app crashed with this error:
java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.GoogleMap com.google.android.gms.maps.MapFragment.getMap()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2790)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2855)
at android.app.ActivityThread.access$900(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6117)
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:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.GoogleMap com.google.android.gms.maps.MapFragment.getMap()' on a null object reference
at com.alezanper.reporter.F_map.MapInit(F_map.java:97)
at com.alezanper.reporter.F_map.onCreateView(F_map.java:65)
at android.app.Fragment.performCreateView(Fragment.java:2114)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:904)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
at android.app.BackStackRecord.run(BackStackRecord.java:833)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
at android.app.Activity.performStart(Activity.java:6411)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2753)
... 10 more
It seems that your map is not correctly initialized. You should debug it with Android Studio by placing a breakpoint when you initialize your map to see what happen.