loup-v / beacons

Flutter beacons plugin for Android and iOS.
Apache License 2.0
78 stars 53 forks source link

[ERROR]java.lang.IllegalArgumentException: Service not registered: org.altbeacon.beacon.BeaconManager$BeaconServiceConnection@ce5387c #12

Closed vinceramcesoliveros closed 6 years ago

vinceramcesoliveros commented 6 years ago

E/AndroidRuntime(15227): java.lang.RuntimeException: Unable to destroy activity {com.example.finalparola/com.google.android.gms.auth.api.signin.internal.SignInHubActivity}: java.lang.IllegalArgumentException: Service not registered: org.altbeacon.beacon.BeaconManager$BeaconServiceConnection@ce5387c E/AndroidRuntime(15227): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5139) E/AndroidRuntime(15227): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5162) E/AndroidRuntime(15227): at android.app.ActivityThread.access$1700(ActivityThread.java:229) E/AndroidRuntime(15227): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1880) E/AndroidRuntime(15227): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(15227): at android.os.Looper.loop(Looper.java:148) E/AndroidRuntime(15227): at android.app.ActivityThread.main(ActivityThread.java:7325) E/AndroidRuntime(15227): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(15227): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1321) E/AndroidRuntime(15227): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1211) E/AndroidRuntime(15227): Caused by: java.lang.IllegalArgumentException: Service not registered: org.altbeacon.beacon.BeaconManager$BeaconServiceConnection@ce5387c E/AndroidRuntime(15227): at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1160) E/AndroidRuntime(15227): at android.app.ContextImpl.unbindService(ContextImpl.java:1475) E/AndroidRuntime(15227): at android.content.ContextWrapper.unbindService(ContextWrapper.java:644) E/AndroidRuntime(15227): at io.intheloup.beacons.logic.BeaconsClient.unbindService(BeaconsClient.kt:246) E/AndroidRuntime(15227): at org.altbeacon.beacon.BeaconManager.unbind(BeaconManager.java:453) E/AndroidRuntime(15227): at io.intheloup.beacons.logic.BeaconsClient.unbind(BeaconsClient.kt:61) E/AndroidRuntime(15227): at io.intheloup.beacons.BeaconsPlugin$1.onActivityDestroyed(BeaconsPlugin.kt:35) E/AndroidRuntime(15227): at android.app.Application.dispatchActivityDestroyed(Application.java:275) E/AndroidRuntime(15227): at android.app.Activity.onDestroy(Activity.java:1883) E/AndroidRuntime(15227): at android.support.v4.app.FragmentActivity.onDestroy(FragmentActivity.java:382) E/AndroidRuntime(15227): at android.app.Activity.performDestroy(Activity.java:7130) E/AndroidRuntime(15227): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1171) E/AndroidRuntime(15227): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5117) E/AndroidRuntime(15227): ... 9 more

I have Google sign in package, and when I try to log in in my physical device, this gives me an error. while on emulator, it doesnt, because emulators don't have bluetooth.

References to this Issue >> https://github.com/AltBeacon/android-beacon-library/issues/139

vinceramcesoliveros commented 6 years ago

The author might have fixed this issue https://github.com/AltBeacon/android-beacon-library/pull/702

still trying to configure the beaconManager!!.unbind(this)

vinceramcesoliveros commented 6 years ago

EDIT: Finally Fixed this by commenting out beaconClient.unbind() in the BeaconsClient.kt in Logic folder.

Although this resolves my Errors, I'm still binding for scanning beacons. which is kinda bad. closing this ATM and wait for more errors.