Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fused Location Provider throws IllegalStateException #1955

Closed
1 of 4 tasks
Cheesebaron opened this issue Jun 16, 2017 · 1 comment
Closed
1 of 4 tasks

Fused Location Provider throws IllegalStateException #1955

Cheesebaron opened this issue Jun 16, 2017 · 1 comment
Milestone

Comments

@Cheesebaron
Copy link
Member

Cheesebaron commented Jun 16, 2017

Steps to reproduce

  1. Start listening to changes
  2. Stop listening again fast enough to not have GoogleApiClient connected
  3. Crash

Expected behavior

It should probably be checked that the client is connected, before trying to remove location updates handlers.

Actual behavior

java.lang.IllegalStateException is thrown:

java.lang.IllegalStateException: GoogleApiClient is not connected yet.
com.google.android.gms.internal.zzqo.zzd(Unknown Source)
com.google.android.gms.internal.zzqr.zzd(Unknown Source)
com.google.android.gms.internal.zzqp.zzd(Unknown Source)
com.google.android.gms.location.internal.zzd.removeLocationUpdates(Unknown Source)
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
android.os.Handler.handleCallback()Handler.java:751
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:154
android.app.ActivityThread.main()ActivityThread.java:6121
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:889
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:779
Xamarin caused by: Java.Lang.RuntimeException: GoogleApiClient is not connected yet.
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<e25755e715fc46b8b923cdc234258b18>:0
Java.Interop.JniEnvironment.InstanceMethods.CallObjectMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args)<e85293bd534b41c28038d78ce93715ba>:0
Android.Runtime.JNIEnv.CallObjectMethod(IntPtr jobject, IntPtr jmethod, JValue* parms)<fbcbadf806a6438189c71b1942dc782b>:0
Android.Gms.Location.IFusedLocationProviderApiInvoker.RemoveLocationUpdates(GoogleApiClient client, LocationCallback callback)<2f517ff09de94c8a95e895eab061bc06>:0
MvvmCross.Plugins.Location.Fused.Droid.FusedLocationHandler.Stop()<7a9c1ef82a234992a27d7e82677d679e>:0
MvvmCross.Plugins.Location.Fused.Droid.MvxAndroidFusedLocationWatcher.PlatformSpecificStop()<7a9c1ef82a234992a27d7e82677d679e>:0
MvvmCross.Plugins.Location.MvxLocationWatcher.Stop()<bc4fd2d74c244087bf3f8dbeeec2273f>:0
NoiseSentinelApp.ViewModels.PublicSitesViewModel.OnLocationError(MvxLocationError obj)<6056251c9e574471a64169ec91935eb0>:0
NoiseSentinelApp.ViewModels.PublicSitesViewModel.<<Initialize>b__10_0>d.MoveNext()<6056251c9e574471a64169ec91935eb0>:0
Android.App.SyncContext.<Post>c__AnonStorey0.<>m__0()<fbcbadf806a6438189c71b1942dc782b>:0
Java.Lang.Thread.RunnableImplementor.Run()<fbcbadf806a6438189c71b1942dc782b>:0
Java.Lang.IRunnableInvoker.n_Run(IntPtr jnienv, IntPtr native__this)<fbcbadf806a6438189c71b1942dc782b>:0
at (wrapper dynamic-method) System.Object:69f7600d-bb85-490e-b882-8281495c333c (intptr,intptr)
--- End of managed Java.Lang.RuntimeException stack trace ---
java.lang.IllegalStateException: GoogleApiClient is not connected yet.
com.google.android.gms.internal.zzqo.zzd(Unknown Source)
com.google.android.gms.internal.zzqr.zzd(Unknown Source)
com.google.android.gms.internal.zzqp.zzd(Unknown Source)
com.google.android.gms.location.internal.zzd.removeLocationUpdates(Unknown Source)
mono.java.lang.RunnableImplementor.n_run(Native Method)
mono.java.lang.RunnableImplementor.run()RunnableImplementor.java:30
android.os.Handler.handleCallback()Handler.java:751
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:154
android.app.ActivityThread.main()ActivityThread.java:6121
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:889
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:779

Configuration

Version: 4.4.0 (Fused Location code has not changed since)

Platform:

  • iOS
  • Android
  • WPF
  • UWP
@Cheesebaron
Copy link
Member Author

This was actually added in 5.0.3 as part of the PR.

@Cheesebaron Cheesebaron modified the milestones: 5.0.3, 5.1.0 Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants