lostzen / lost

A drop-in replacement for Google Play services location APIs for Android
http://mapzen.github.io/lost/
Other
352 stars 70 forks source link

NPE when attempting to invoke interface method com.mapzen.android.lost.internal.IFusedLocationProviderService.getLocationAvailability() #198

Closed zugaldia closed 7 years ago

zugaldia commented 7 years ago

Description

We've updated to the latest SNAPSHOT for 2.3.0 and we're starting to receive reports https://github.com/mapbox/mapbox-gl-native/issues/8999 of a NPE exception:

java.lang.NullPointerException: Attempt to invoke interface method 'com.mapzen.android.lost.api.LocationAvailability com.mapzen.android.lost.internal.IFusedLocationProviderService.getLocationAvailability()' on a null object reference
                                                                            at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl$1$1.run(FusedLocationProviderApiImpl.java:51)
                                                                            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:6776)
                                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

Looks like LocationAvailability is null when the internal getLocationAvailability() gets called. This makes us think the issue isn't coming from our SDK, but from LOST itself.

Steps to Reproduce

This happens when a developer enables user tracking, which uses LOST under the hood.

Lost & Android Version

2.3.0-SNAPSHOT Android 7.0

tobrun commented 7 years ago

@sarahlensing our users have been testing out the latest snapshot and seem to have a similar crash but now when disabling. More information here. Would it be possible to reopen this issue?