lost icon indicating copy to clipboard operation
lost copied to clipboard

LostApiClient is not connected in onConnected

Open tananaev opened this issue 6 years ago • 1 comments

Description

I have Firebase Crashlytics integrated in the app and I get a lot of stack traces like this:

Fatal Exception: java.lang.IllegalStateException
LostApiClient is not connected.
com.mapzen.android.lost.internal.ApiImpl.throwIfNotConnected (ApiImpl.java:11)
com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.getLastLocation (FusedLocationProviderApiImpl.java:134)
org.traccar.client.ShortcutActivity.onConnected (ShortcutActivity.java:115)
com.mapzen.android.lost.internal.FusedLocationServiceConnectionManager.onServiceConnected (FusedLocationServiceConnectionManager.java:86)
com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.onServiceConnected (FusedLocationProviderApiImpl.java:94)

As you can see, for some reason I get LostApiClient is not connected exception in onConnected callback.

Here is the code of my app:

ShortcutActivity.java#L112

Basically I have a shortcut activity where I want to immediately get last known location and send it to the server.

Steps to Reproduce

Unfortunately I don't have information on how to reproduce it, but there are quite a few reported crashed on different device models.

Lost & Android Version

Lost version: 3.0.4

Android versions:

  • 8.0.0
  • 7.1.1
  • 7.0
  • 6.0.1
  • 6.0
  • 5.1.1

tananaev avatar Apr 30 '18 02:04 tananaev

Now reproducible with https://github.com/traccar/traccar-client-android/issues/349.

oliv3 avatar Sep 11 '18 00:09 oliv3

Closing as this repo is no longer maintained.

msmollin avatar Apr 23 '23 14:04 msmollin