Estimote / Android-Proximity-SDK

Estimote Proximity SDK for Android
https://developer.estimote.com
MIT License
82 stars 41 forks source link

Bluetooth Low Energy scan failed with error code: 2 #36

Closed Goncalo-Almeida closed 6 years ago

Goncalo-Almeida commented 6 years ago

Prerequisites

Basic information

Estimote SDK version: 0.3.3

Android devices affected: 1.Vodafone VFD 600 2.Vodafone VFD 610 3.BlackView BV6000 4.Samsung J3(2016)

Android OS version affected (same order as above): 1.6.0.1 2.7.0 3.7.0 4.5.1.1

Beacon hardware version: G1.8

Description

I'm getting an Exception that crashes the App when starting to scan for beacons. For some reason this happens mostly on the listed devices, but it is also possible to trigger on other devices by turning off and on the Bluetooth before and/or after the scanning starts. This can be a bit hard to reproduce, sorry I don't have more information on this.

After entering this state, it's very hard to make it stop. In some case I had to uninstall the App to stop the behaviour. This could be related to the fact that the App crashes and the observationHandler.stop() is never called, because onDestroy() is also never called. This is annoying because the notification keeps firing.

Although the Bluetooth error code varies between 2 and 4, the problem seems to arise from the same place: PostLollipopEstimoteScanner.kt:29

(Optional) Steps to reproduce:

  1. Create a ProximityObserver My code:

    Notification notification =
                notificationHelper.getNotification("Beacon Scan", "Scan is running...", null);
        cloudCredentials = new EstimoteCloudCredentials(ESTIMOTE_APP_ID, ESTIMOTE_APP_TOKEN);
        proximityObserver = new ProximityObserverBuilder(mActivity, cloudCredentials)
                .withBalancedPowerMode()
                .withScannerInForegroundService(notification)
                .withOnErrorAction(onErrorAction)
                .build();
    
        venueZone = proximityObserver.zoneBuilder()
                .forAttachmentKeyAndValue("place", "some_place")
                .inNearRange()
                .withOnEnterAction(onEnterAction)
                .withOnExitAction(onExitAction)
                .withOnChangeAction(onChangeAction)
                .create();
    
        observationHandler =
                proximityObserver
                        .addProximityZone(venueZone)
                        .start();
  2. Start scanning
  3. Turn the BT on and off as necessary until the App crashes

Expected behavior: Either a warning or some error for the developer to deal with.

Actual behavior: Application crashes

Additional information

FATAL EXCEPTION: main
                  Process: pt.vasp.mobile.vaspat, PID: 10609
                  io.reactivex.exceptions.UndeliverableException: java.lang.Exception: Bluetooth Low Energy scan failed with error code: 2
                      at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:349)
                      at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.onError(ObservableCreate.java:74)
                      at com.estimote.scanning_plugin.packet_provider.scanner.PostLollipopEstimoteScanner$scan$1$callback$1.onScanFailed(PostLollipopEstimoteScanner.kt:29)
                      at android.bluetooth.le.BluetoothLeScanner$1.run(BluetoothLeScanner.java:416)
                      at android.os.Handler.handleCallback(Handler.java:739)
                      at android.os.Handler.dispatchMessage(Handler.java:95)
                      at android.os.Looper.loop(Looper.java:148)
                      at android.app.ActivityThread.main(ActivityThread.java:5417)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                   Caused by: java.lang.Exception: Bluetooth Low Energy scan failed with error code: 2
                      at com.estimote.scanning_plugin.packet_provider.scanner.PostLollipopEstimoteScanner$scan$1$callback$1.onScanFailed(PostLollipopEstimoteScanner.kt:29) 
                      at android.bluetooth.le.BluetoothLeScanner$1.run(BluetoothLeScanner.java:416) 
                      at android.os.Handler.handleCallback(Handler.java:739) 
                      at android.os.Handler.dispatchMessage(Handler.java:95) 
                      at android.os.Looper.loop(Looper.java:148) 
                      at android.app.ActivityThread.main(ActivityThread.java:5417) 
                      at java.lang.reflect.Method.invoke(Native Method) 
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
FATAL EXCEPTION: main
                  Process: pt.vasp.mobile.vaspat, PID: 31263
                  io.reactivex.exceptions.UndeliverableException: java.lang.Exception: Bluetooth Low Energy scan failed with error code: 4
                      at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:349)
                      at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.onError(ObservableCreate.java:74)
                      at com.estimote.scanning_plugin.packet_provider.scanner.PostLollipopEstimoteScanner$scan$1$callback$1.onScanFailed(PostLollipopEstimoteScanner.kt:29)
                      at android.bluetooth.le.BluetoothLeScanner$1.run(BluetoothLeScanner.java:442)
                      at android.os.Handler.handleCallback(Handler.java:739)
                      at android.os.Handler.dispatchMessage(Handler.java:95)
                      at android.os.Looper.loop(Looper.java:145)
                      at android.app.ActivityThread.main(ActivityThread.java:6934)
                      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:1404)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
                   Caused by: java.lang.Exception: Bluetooth Low Energy scan failed with error code: 4
                      at com.estimote.scanning_plugin.packet_provider.scanner.PostLollipopEstimoteScanner$scan$1$callback$1.onScanFailed(PostLollipopEstimoteScanner.kt:29) 
                      at android.bluetooth.le.BluetoothLeScanner$1.run(BluetoothLeScanner.java:442) 
                      at android.os.Handler.handleCallback(Handler.java:739) 
                      at android.os.Handler.dispatchMessage(Handler.java:95) 
                      at android.os.Looper.loop(Looper.java:145) 
                      at android.app.ActivityThread.main(ActivityThread.java:6934) 
                      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:1404) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 
Goncalo-Almeida commented 6 years ago

Hi @pawelDylag, I saw you solved issue 32 and decided to test how this would impact the issues I have opened. I've just tested version 0.4.1 of the Proximity SDK and, although the app still crashes, I'm now getting this exception:

FATAL EXCEPTION: RxCachedThreadScheduler-14
                                                                            Process: pt.mobile.vasp.beacontestapp, PID: 8004
                                                                            java.lang.IllegalStateException: Unable to create bluetooth LE scanner instance
                                                                                at com.estimote.scanning_plugin.packet_provider.scanner.AlwaysErrorEstimoteScaner.scan(AlwaysErrorEstimoteScaner.kt:13)
                                                                                at com.estimote.scanning_plugin.packet_provider.use_cases.EstimoteSecureScanUseCase.run(EstimoteSecureScanUseCase.kt:20)
                                                                                at com.estimote.scanning_plugin.packet_provider.EstimotePacketProvider.provideEstimoteSecure(EstimotePacketProvider.kt:97)
                                                                                at com.estimote.scanning_plugin.api.EstimoteBluetoothScanner$estimoteSecureScan$1.invoke(EstimoteBluetoothScanner.kt:46)
                                                                                at com.estimote.scanning_plugin.api.EstimoteBluetoothScanner$estimoteSecureScan$1.invoke(EstimoteBluetoothScanner.kt:10)
                                                                                at com.estimote.scanning_plugin.api.use_cases.ScanUseCase$scanForPacketsAccordingToSettings$1.apply(ScanUseCase.kt:22)
                                                                                at com.estimote.scanning_plugin.api.use_cases.ScanUseCase$scanForPacketsAccordingToSettings$1.apply(ScanUseCase.kt:8)
                                                                                at io.reactivex.internal.operators.observable.ObservableScalarXMap$ScalarXMapObservable.subscribeActual(ObservableScalarXMap.java:142)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10889)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10818)
                                                                                at com.estimote.scanning_plugin.api.use_cases.ScanUseCase.notifyUserCallbacks(ScanUseCase.kt:28)
                                                                                at com.estimote.scanning_plugin.api.use_cases.ScanUseCase.run(ScanUseCase.kt:14)
                                                                                at com.estimote.scanning_plugin.api.scan_launchers.BaseScannerScanLauncher.start(BaseScannerScanLauncher.kt:25)
                                                                                at com.estimote.scanning_plugin.api.scan_launchers.BaseScannerScanLauncher.start(BaseScannerScanLauncher.kt:8)
                                                                                at com.estimote.proximity_sdk.monitoring.estimote_monitoring.secure.SecureEstimoteMonitor$startEstimoteSecureScanResolving$1.subscribe(SecureEstimoteMonitor.kt:47)
                                                                                at io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual(ObservableCreate.java:40)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableGroupBy.subscribeActual(ObservableGroupBy.java:48)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:33)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableFlatMap.subscribeActual(ObservableFlatMap.java:55)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.subscribeInner(ObservableFlatMap.java:162)
                                                                                at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.onNext(ObservableFlatMap.java:139)
                                                                                at io.reactivex.internal.operators.observable.ObservableFromArray$FromArrayDisposable.run(ObservableFromArray.java:107)
                                                                                at io.reactivex.internal.operators.observable.ObservableFromArray.subscribeActual(ObservableFromArray.java:36)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableFlatMap.subscribeActual(ObservableFlatMap.java:55)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservablePublish.connect(ObservablePublish.java:116)
                                                                                at io.reactivex.internal.operators.observable.ObservableRefCount.subscribeActual(ObservableRefCount.java:68)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableFilter.subscribeActual(ObservableFilter.java:30)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:33)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservablePublish.connect(ObservablePublish.java:116)
03-16 09:53:22.415 8004-8829/pt.mobile.vasp.beacontestapp E/AndroidRuntime:     at io.reactivex.internal.operators.observable.ObservableRefCount.subscribeActual(ObservableRefCount.java:68)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:33)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.subscribeInner(ObservableFlatMap.java:162)
                                                                                at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.onNext(ObservableFlatMap.java:139)
                                                                                at io.reactivex.internal.operators.observable.ObservableFromArray$FromArrayDisposable.run(ObservableFromArray.java:107)
                                                                                at io.reactivex.internal.operators.observable.ObservableFromArray.subscribeActual(ObservableFromArray.java:36)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableFlatMap.subscribeActual(ObservableFlatMap.java:55)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:33)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:33)
                                                                                at io.reactivex.Observable.subscribe(Observable.java:10903)
                                                                                at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
                                                                                at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
                                                                                at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61)
                                                                                at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52)
                                                                                at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
                                                                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                                at java.lang.Thread.run(Thread.java:761)
03-16 09:53:22.443 8004-8800/pt.mobile.vasp.beacontestapp V/FA: Recording user engagement, ms: 5691
03-16 09:53:22.447 8004-8800/pt.mobile.vasp.beacontestapp V/FA: Connecting to remote service
03-16 09:53:22.452 8004-8035/pt.mobile.vasp.beacontestapp D/libc-netbsd: getaddrinfo: reports.crashlytics.com get result from proxy gai_error = 0
03-16 09:53:22.453 8004-8035/pt.mobile.vasp.beacontestapp I/System.out: [socket][13] connection reports.crashlytics.com/23.23.172.199:443;LocalPort=-1(10000)

                                                                        [ 03-16 09:53:22.454  8004: 8035 D/         ]
                                                                        [Posix_connect Debug]Process pt.mobile.vasp.beacontestapp :443 
03-16 09:53:22.461 8004-8800/pt.mobile.vasp.beacontestapp V/FA: Activity paused, time: 332208896
03-16 09:53:22.469 8004-8800/pt.mobile.vasp.beacontestapp D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=5691, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=8829751764027338470}]
03-16 09:53:22.492 8004-8829/pt.mobile.vasp.beacontestapp I/Process: Sending signal. PID: 8004 SIG: 9
MBach commented 6 years ago

I also have this error. It seems that sometimes, the Bluetooth stack is completely lost. Turning Bluetooth off and on doesn't change anything. The only reliable solution that I found is: toggling Airplane mode on and off (or rebooting the phone).

pawelDylag commented 6 years ago

Hello guys,

Sorry for the delay, I was on my vacation last week. I'll be looking into this problem and will let you know about the progress soon :)

Thanks @Goncalo-Almeida for filling in all the necessary data - it's super helpful :)

Goncalo-Almeida commented 6 years ago

Sure no problem! Let me know if I can help any further. I have few different smartphones where I can test stuff.

pawelDylag commented 6 years ago

Oh, by the way - have you tried using our RequirementsChecker before starting your proximity observation? It should check for all the necessary requirements, such as BLE enabled.

Goncalo-Almeida commented 6 years ago

I had the code using the RequirementsChecker commented out on the sample app, so I'm not sure how I tested it or why was is commented.

So, I've just tested it again and I can't seem to recreate the issue anymore. I'll be testing this on the actual App and the QA department will be testing this on multiple phones.

Could you leave the issue opened and I'll let you know how it goes? This should be done over the next few days. I'll keep you posted on any developments.

pawelDylag commented 6 years ago

Hello guys,

When it comes to the scan error 2, then according to the Android official documentation, the problem is with registering BLE scan callbacks in system's bluetooth service. Our SDK registers several of them for additional features like Estimote Secure Monitoring or Telemetry Data Gathering (your beacons' battery status etc). Some phones may not be able to handle that many callbacks, so they are throwing scan error 2. There are two possible solutions for that, and I need a feedback from you if it helps:

  1. Use RequirementsChecker before starting your proximity observation.
  2. Disable additional features when building your ProximityObserver object. There are two of them enabled by default - Telemetry scanning, and Estimote Secure Monitoring. If you don't need to use them, you can disable them like this:
        proximityObserver = ProximityObserverBuilder(applicationContext, cloudCredentials)
                ...
                .withEstimoteSecureMonitoringDisabled()
                .withTelemetryReportingDisabled()
                ...
                .build()

    The above should reduce the number of BLE callbacks being registered in OS, thus reducing the possibility of Scan error 2.

Lemme know if that helps :) Paweł

francisco-rg commented 6 years ago

Hi Pawel,

Implement today solution 1. still on testings, however, before reporting we had number 2 implement long before, monitoring, telemetry and even analytics are disable, and still we saw a scan error 2, not always of course.

So with number 2 I can't say if it really reduced, so let's see how it work with number 1

thanks

pawelDylag commented 6 years ago

Hey

Version 0.4.2 is now live - all uncaught errors should be now properly reported via onErrorAction. No crashes should occur from now on :)

Let me know about any other problems you encounter!

Veer50 commented 6 years ago

Thank you. @pawelDylag

GraceHuntley commented 6 years ago

I am still having error code 2's and 4's depending on the device and the onErrorAction is still not catching them causing the estimote proximity library to just crash the app. This 0.4.2 does not seem to change anything.

pawelDylag commented 6 years ago

Hey guys,

Pro tip to my future self - always check if you rebased and merged feature branch to master before releasing the new version 😆 Sorry for this, the version 0.4.3 should contain all the changes ^^

Regards, Paweł

santoshgrs commented 6 years ago

Hi pawelDylag,

I am still having crash due to scan error code 2. right now i am using latest version 0.4.4 but result are same......... crash :(

pawelDylag commented 6 years ago

Hey @santoshgrs

There is a difference between "crash" and "error". The fix prevents your app from crashing (uncaught exception being thrown) and instead reports this to your onErrorAction (or log an error to the logcat by default).

The fix doesn't resolve error code 2 being thrown per se, but prevents your app from crashing when you get it. This is exactly an expected behaviour that @Goncalo-Almeida posted: Expected behavior: Either a warning or some error for the developer to deal with.

We will be focusing on fixing the source of scan error 2 in the later update.

Regards, Paweł

rothariger commented 6 years ago

hi Pawel,

i'm currently using version 0.5.0, i'm facing the same issue, but i get the exception sometimes... from 5 executions 3 times i get the exception...

is there any news about this issue?

rothariger commented 6 years ago

the thing goes worse, i need to have this as a service and when i put the code to get this working, the entire application crashes...

pawelDylag commented 6 years ago

Hey @rothariger

It is impossible for me to diagnose your problem just from reading "the thing goes worse". What I essentially need is basic information, necessary to proceed further in solving the case. Please consider reporting a new issue and remember to fill in the template with all the necessary (for me) information.

Kind regards, Paweł

rothariger commented 6 years ago

48

ShugaSvc commented 6 years ago

Hi All we've also hit this issue using 0.5.1 SDK. Here's our stack trace... Hi @pawelDylag please let me know what other info I can provide to help:

com.estimote.scanning_plugin.packet_provider.scanner.AlwaysErrorEstimoteScaner.scan (AlwaysErrorEstimoteScaner.kt:13) com.estimote.scanning_plugin.packet_provider.use_cases.EstimoteLocationScanUseCase.run (EstimoteLocationScanUseCase.kt:22) com.estimote.scanning_plugin.packet_provider.EstimotePacketProvider.provideEstimoteLocation (EstimotePacketProvider.kt:44) com.estimote.scanning_plugin.api.EstimoteBluetoothScanner$estimoteLocationScan$1.invoke (EstimoteBluetoothScanner.kt:16) com.estimote.scanning_plugin.api.EstimoteBluetoothScanner$estimoteLocationScan$1.invoke (EstimoteBluetoothScanner.kt:10) com.estimote.scanning_plugin.api.use_cases.ScanUseCase$scanForPacketsAccordingToSettings$1.apply (ScanUseCase.kt:22) com.estimote.scanning_plugin.api.use_cases.ScanUseCase$scanForPacketsAccordingToSettings$1.apply (ScanUseCase.kt:8) io.reactivex.internal.operators.observable.ObservableScalarXMap$ScalarXMapObservable.subscribeActual (ObservableScalarXMap.java:142) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.Observable.subscribe (Observable.java:10889) io.reactivex.Observable.subscribe (Observable.java:10818) com.estimote.scanning_plugin.api.use_cases.ScanUseCase.notifyUserCallbacks (ScanUseCase.kt:28) com.estimote.scanning_plugin.api.use_cases.ScanUseCase.run (ScanUseCase.kt:14) com.estimote.scanning_plugin.api.scan_launchers.BaseScannerScanLauncher.start (BaseScannerScanLauncher.kt:25) com.estimote.scanning_plugin.api.scan_launchers.BaseScannerScanLauncher.start (BaseScannerScanLauncher.kt:8) com.estimote.proximity_sdk.monitoring.estimote_monitoring.SimpleEstimoteMonitor$startEstimoteLocationScan$1.subscribe (SimpleEstimoteMonitor.kt:45) io.reactivex.internal.operators.observable.ObservableCreate.subscribeActual (ObservableCreate.java:40) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservablePublish.connect (ObservablePublish.java:116) io.reactivex.internal.operators.observable.ObservableRefCount.subscribeActual (ObservableRefCount.java:68) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableFilter.subscribeActual (ObservableFilter.java:30) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableMap.subscribeActual (ObservableMap.java:33) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservablePublish.connect (ObservablePublish.java:116) io.reactivex.internal.operators.observable.ObservableRefCount.subscribeActual (ObservableRefCount.java:68) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableDebounceTimed.subscribeActual (ObservableDebounceTimed.java:40) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableMap.subscribeActual (ObservableMap.java:33) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableOnErrorNext.subscribeActual (ObservableOnErrorNext.java:38) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.subscribeInner (ObservableFlatMap.java:162) io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.onNext (ObservableFlatMap.java:139) io.reactivex.internal.operators.observable.ObservableFromArray$FromArrayDisposable.run (ObservableFromArray.java:107) io.reactivex.internal.operators.observable.ObservableFromArray.subscribeActual (ObservableFromArray.java:36) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableFlatMap.subscribeActual (ObservableFlatMap.java:55) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableMap.subscribeActual (ObservableMap.java:33) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableMap.subscribeActual (ObservableMap.java:33) io.reactivex.Observable.subscribe (Observable.java:10903) io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run (ObservableSubscribeOn.java:96) io.reactivex.Scheduler$DisposeTask.run (Scheduler.java:452) io.reactivex.internal.schedulers.ScheduledRunnable.run (ScheduledRunnable.java:61) io.reactivex.internal.schedulers.ScheduledRunnable.call (ScheduledRunnable.java:52) java.util.concurrent.FutureTask.run (FutureTask.java:266) java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:301) java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162) java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636) java.lang.Thread.run (Thread.java:764)

mackankowski commented 5 years ago

Issue seems to be not fixed for a very long time...

crysxd commented 5 years ago

Still getting this error on a Nexus 6P with 8.1 with Proximity SDK version 1.0.3

jake41 commented 5 years ago

@pawelDylag What is the fix for this ? I am not able to download 0.4.3

npm ERR! code ETARGET npm ERR! notarget No matching version found for @estimote/react-native-proximity@^0.4.3 npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist. npm ERR! notarget

npm ERR! A complete log of this run can be found in:

gfox72 commented 5 years ago

On 8.1.0 and getting the same persistent onScanFailed errorCode 2, nothing seems to fix it :$ - only option is to downgrade <8.0 ?

robauer commented 4 years ago

I'm still seeing this: override fun onStart() { Log.d("ScanDevice Activity", "onStart()") super.onStart()

    when (checkSelfPermission(**this**, **Manifest.permission.ACCESS_COARSE_LOCATION**)) {
        PackageManager.PERMISSION_GRANTED -> {
            **bluetoothLeScanner**.startScan(**BleScanner**)
        }
        else -> requestPermissions(arrayOf(Manifest.permission.ACCESS_COARSE_LOCATION), 1)
    }
}

bolded items are shown as error.

robauer commented 4 years ago

Or I guess the text in between is the error...