Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

react-native android application crashes after startObservingZones start working #8

Closed
rezkyal opened this issue Jul 11, 2018 · 5 comments
Labels
native Resolution depends on the native SDK

Comments

@rezkyal
Copy link

rezkyal commented Jul 11, 2018

I tried the example in index.js in android and ended up crashing, i tried to trace which code make it crash and it seems because of this line

      RNEP.proximityObserver.startObservingZones([zone1, zone2]);

and also i tried the adb logcat and ended up getting this

07-11 09:28:49.379 16733 16808 E AndroidRuntime: FATAL EXCEPTION: RxComputationThreadPool-1
07-11 09:28:49.379 16733 16808 E AndroidRuntime: Process: com.smarthospital, PID: 16733
07-11 09:28:49.379 16733 16808 E AndroidRuntime: io.reactivex.exceptions.CompositeException: 2 exceptions occurred.
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:80)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeOnObserver.onError(ObservableSubscribeOn.java:63)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.checkTerminate(ObservableFlatMap.java:495)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.drainLoop(ObservableFlatMap.java:331)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.drain(ObservableFlatMap.java:323)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.onError(ObservableFlatMap.java:288)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleToObservable$SingleToObservableObserver.onError(SingleToObservable.java:65)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onError(SingleMap.java:69)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onError(SingleMap.java:69)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onError(SingleMap.java:69)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onError(SingleMap.java:69)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleDoOnSuccess$DoOnSuccess.onSuccess(SingleDoOnSuccess.java:56)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.observers.ResumeSingleObserver.onSuccess(ResumeSingleObserver.java:46)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableReduceSeedSingle$ReduceSeedObserver.onComplete(FlowableReduceSeedSingle.java:102)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drainLoop(FlowableFlatMap.java:426)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drain(FlowableFlatMap.java:366)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onComplete(FlowableFlatMap.java:338)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFromIterable$IteratorSubscription.fastPath(FlowableFromIterable.java:201)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFromIterable$BaseRangeSubscription.request(FlowableFromIterable.java:123)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onSubscribe(FlowableFlatMap.java:115)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFromIterable.subscribe(FlowableFromIterable.java:69)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFromIterable.subscribeActual(FlowableFromIterable.java:47)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.Flowable.subscribe(Flowable.java:12995)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.Flowable.subscribe(Flowable.java:12941)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableFlatMapPublisher.subscribeActual(FlowableFlatMapPublisher.java:43)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.Flowable.subscribe(Flowable.java:12995)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.Flowable.subscribe(Flowable.java:12941)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.flowable.FlowableReduceSeedSingle.subscribeActual(FlowableReduceSeedSingle.java:48)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.Single.subscribe(Single.java:2707)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleDelayWithCompletable$OtherObserver.onComplete(SingleDelayWithCompletable.java:70)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.completable.CompletableOnErrorComplete$OnError.onComplete(CompletableOnErrorComplete.java:48)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleFlatMapCompletable$FlatMapCompletableObserver.onComplete(SingleFlatMapCompletable.java:102)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.disposables.EmptyDisposable.complete(EmptyDisposable.java:68)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.completable.CompletableEmpty.subscribeActual(CompletableEmpty.java:27)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.Completable.subscribe(Completable.java:1635)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleFlatMapCompletable$FlatMapCompletableObserver.onSuccess(SingleFlatMapCompletable.java:91)
07-11 09:28:49.379 16733 16808 E AndroidRuntime:        at io.reactivex.internal.operators.single.SingleFlatMap$SingleFlatMapCallback$FlatMapSingleObserver.onSuccess(SingleFlatMap.java:1

I tried it at meizu-m5 which run on android 6.0

@gchallen
Copy link
Contributor

I'm seeing the same thing. My app works fine on iOS but crashes immediately on Android. I'm seeing similar logs but also this:

com.estimote.proximity_sdk.exception.NoContextForGivenZonesException: No beacons for given attachment/tag values. Make sure you've en
tered attachment/tag names correctly, your app has network connection available (at least once), and items/tags are correctly assigned to your beacons in the Estimote Cloud.

@gchallen
Copy link
Contributor

OK, never mind. This started working again after I created a empty attachment on cloud.estimote.com and associating it with the beacon I'm using. Kind of silly though.

@heypiotr
Copy link
Contributor

@gchallen: that was a bug in the native Android Proximity SDK, fixed in native version 0.6.2. I just updated the wrapper to that version, feel free to update to wrapper version 0.3.2.

The crash is a result of another bug in the Android Proximity SDK, where the onError method instead of just reporting the exception, crashes the app. (Related issues: #1 and #3)

@rezkyal: The FATAL EXCEPTION: RxComputationThreadPool-1 looks like a problem specific to the Android device/OS you're running. Since this is a problem in the native Android Proximity SDK, I'd advise to post the issue on https://github.com/estimote/android-proximity-sdk/issues. I can't fix it directly in this wrapper.

@heypiotr heypiotr added the native Resolution depends on the native SDK label Jul 17, 2018
@taran-tii
Copy link

taran-tii commented Jul 17, 2018

Hi @gchallen I update to wrapper version to 0.3.2. But Still get same issue please help

io.reactivex.exceptions.CompositeException · 2 exceptions occurred.
LambdaObserver.java:80io.reactivex.internal.observers.LambdaObserver.onError	
ObservableObserveOn.java:276io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated	
ObservableObserveOn.java:172io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal	
ObservableObserveOn.java:252io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run	
HandlerScheduler.java:109io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run	
Handler.java:790android.os.Handler.handleCallback	
Handler.java:99android.os.Handler.dispatchMessage	
Looper.java:164android.os.Looper.loop	
ActivityThread.java:6494android.app.ActivityThread.main	
Method.java:-2java.lang.reflect.Method.invoke	
RuntimeInit.java:438com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run	
ZygoteInit.java:807com.android.internal.os.ZygoteInit.main	
Caused By: io.reactivex.exceptions.CompositeException$CompositeExceptionCausalChain · Chain of Causes for CompositeException In Order Received =>
StrictModeHandler.java:89com.bugsnag.android.StrictModeHandler.getRootCause	
StrictModeHandler.java:57com.bugsnag.android.StrictModeHandler.isStrictModeThrowable	
ExceptionHandler.java:60com.bugsnag.android.ExceptionHandler.uncaughtException	
ThreadGroup.java:1068java.lang.ThreadGroup.uncaughtException	
ThreadGroup.java:1063java.lang.ThreadGroup.uncaughtException	
RxJavaPlugins.java:411io.reactivex.plugins.RxJavaPlugins.uncaught	
RxJavaPlugins.java:365io.reactivex.plugins.RxJavaPlugins.onError	
LambdaObserver.java:80io.reactivex.internal.observers.LambdaObserver.onError	
ObservableObserveOn.java:276io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated	
ObservableObserveOn.java:172io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal	
ObservableObserveOn.java:252io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run	
HandlerScheduler.java:109io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run	
Handler.java:790android.os.Handler.handleCallback	
Handler.java:99android.os.Handler.dispatchMessage	
Looper.java:164android.os.Looper.loop	
ActivityThread.java:6494android.app.ActivityThread.main	
Method.java:-2java.lang.reflect.Method.invoke	
RuntimeInit.java:438com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run	
ZygoteInit.java:807com.android.internal.os.ZygoteInit.main	
Caused By: com.estimote.proximity_sdk.exception.NoContextForGivenZonesException · No beacons for given tag values. Make sure you've entered tag names correctly, your app has network connection available (at least once), and tags are correctly assigned to your beacons in Estimote Cloud.
ProximityObservationUseCase.kt:48com.estimote.proximity_sdk.proximity.ProximityObservationUseCase$invokeOnErrorWhenNoContextForGivenZones$1.accept	
ProximityObservationUseCase.kt:17com.estimote.proximity_sdk.proximity.ProximityObservationUseCase$invokeOnErrorWhenNoContextForGivenZones$1.accept	
SingleDoOnSuccess.java:53io.reactivex.internal.operators.single.SingleDoOnSuccess$DoOnSuccess.onSuccess	
ResumeSingleObserver.java:46io.reactivex.internal.observers.ResumeSingleObserver.onSuccess	
FlowableReduceSeedSingle.java:102io.reactivex.internal.operators.flowable.FlowableReduceSeedSingle$ReduceSeedObserver.onComplete	
FlowableFlatMap.java:426io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drainLoop	
FlowableFlatMap.java:366io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drain	
FlowableFlatMap.java:338io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onComplete	
FlowableFromIterable.java:201io.reactivex.internal.operators.flowable.FlowableFromIterable$IteratorSubscription.fastPath	
FlowableFromIterable.java:123io.reactivex.internal.operators.flowable.FlowableFromIterable$BaseRangeSubscription.request	
FlowableFlatMap.java:115io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onSubscribe	
FlowableFromIterable.java:69io.reactivex.internal.operators.flowable.FlowableFromIterable.subscribe	
FlowableFromIterable.java:47io.reactivex.internal.operators.flowable.FlowableFromIterable.subscribeActual	
Flowable.java:12995io.reactivex.Flowable.subscribe	
Flowable.java:12941io.reactivex.Flowable.subscribe	
FlowableFlatMapPublisher.java:43io.reactivex.internal.operators.flowable.FlowableFlatMapPublisher.subscribeActual	
Flowable.java:12995io.reactivex.Flowable.subscribe	
Flowable.java:12941io.reactivex.Flowable.subscribe	
FlowableReduceSeedSingle.java:48io.reactivex.internal.operators.flowable.FlowableReduceSeedSingle.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleDelayWithCompletable.java:70io.reactivex.internal.operators.single.SingleDelayWithCompletable$OtherObserver.onComplete	
CompletableOnErrorComplete.java:48io.reactivex.internal.operators.completable.CompletableOnErrorComplete$OnError.onComplete	
SingleFlatMapCompletable.java:102io.reactivex.internal.operators.single.SingleFlatMapCompletable$FlatMapCompletableObserver.onComplete	
EmptyDisposable.java:68io.reactivex.internal.disposables.EmptyDisposable.complete	
CompletableEmpty.java:27io.reactivex.internal.operators.completable.CompletableEmpty.subscribeActual	
Completable.java:1635io.reactivex.Completable.subscribe	
SingleFlatMapCompletable.java:91io.reactivex.internal.operators.single.SingleFlatMapCompletable$FlatMapCompletableObserver.onSuccess	
SingleFlatMap.java:111io.reactivex.internal.operators.single.SingleFlatMap$SingleFlatMapCallback$FlatMapSingleObserver.onSuccess	
SingleMap.java:64io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onSuccess	
FlowableToListSingle.java:103io.reactivex.internal.operators.flowable.FlowableToListSingle$ToListSubscriber.onComplete	
BasicFuseableSubscriber.java:120io.reactivex.internal.subscribers.BasicFuseableSubscriber.onComplete	
FlowableFlatMap.java:426io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drainLoop	
FlowableFlatMap.java:366io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drain	
FlowableFlatMap.java:338io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onComplete	
FlowableFromIterable.java:201io.reactivex.internal.operators.flowable.FlowableFromIterable$IteratorSubscription.fastPath	
FlowableFromIterable.java:123io.reactivex.internal.operators.flowable.FlowableFromIterable$BaseRangeSubscription.request	
FlowableFlatMap.java:115io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onSubscribe	
FlowableFromIterable.java:69io.reactivex.internal.operators.flowable.FlowableFromIterable.subscribe	
FlowableFromIterable.java:47io.reactivex.internal.operators.flowable.FlowableFromIterable.subscribeActual	
Flowable.java:12995io.reactivex.Flowable.subscribe	
Flowable.java:12941io.reactivex.Flowable.subscribe	
FlowableFlatMapPublisher.java:43io.reactivex.internal.operators.flowable.FlowableFlatMapPublisher.subscribeActual	
Flowable.java:12995io.reactivex.Flowable.subscribe	
FlowableMap.java:38io.reactivex.internal.operators.flowable.FlowableMap.subscribeActual	
Flowable.java:12995io.reactivex.Flowable.subscribe	
FlowableToListSingle.java:57io.reactivex.internal.operators.flowable.FlowableToListSingle.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleMap.java:34io.reactivex.internal.operators.single.SingleMap.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleFlatMap.java:84io.reactivex.internal.operators.single.SingleFlatMap$SingleFlatMapCallback.onSuccess	
SingleMap.java:64io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onSuccess	
ObservableSingleSingle.java:111io.reactivex.internal.operators.observable.ObservableSingleSingle$SingleElementObserver.onComplete	
BodyObservable.java:66com.jakewharton.retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onComplete	
CallObservable.java:47com.jakewharton.retrofit2.adapter.rxjava2.CallObservable.subscribeActual	
Observable.java:10903io.reactivex.Observable.subscribe	
BodyObservable.java:34com.jakewharton.retrofit2.adapter.rxjava2.BodyObservable.subscribeActual	
Observable.java:10903io.reactivex.Observable.subscribe	
ObservableSingleSingle.java:35io.reactivex.internal.operators.observable.ObservableSingleSingle.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleMap.java:34io.reactivex.internal.operators.single.SingleMap.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleFlatMap.java:36io.reactivex.internal.operators.single.SingleFlatMap.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleFlatMapCompletable.java:44io.reactivex.internal.operators.single.SingleFlatMapCompletable.subscribeActual	
Completable.java:1635io.reactivex.Completable.subscribe	
CompletableOnErrorComplete.java:35io.reactivex.internal.operators.completable.CompletableOnErrorComplete.subscribeActual	
Completable.java:1635io.reactivex.Completable.subscribe	
SingleDelayWithCompletable.java:36io.reactivex.internal.operators.single.SingleDelayWithCompletable.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleDoOnSuccess.java:35io.reactivex.internal.operators.single.SingleDoOnSuccess.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleMap.java:34io.reactivex.internal.operators.single.SingleMap.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleMap.java:34io.reactivex.internal.operators.single.SingleMap.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleMap.java:34io.reactivex.internal.operators.single.SingleMap.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleMap.java:34io.reactivex.internal.operators.single.SingleMap.subscribeActual	
Single.java:2707io.reactivex.Single.subscribe	
SingleToObservable.java:34io.reactivex.internal.operators.single.SingleToObservable.subscribeActual	
Observable.java:10903io.reactivex.Observable.subscribe	
ObservableFlatMap.java:55io.reactivex.internal.operators.observable.ObservableFlatMap.subscribeActual	
Observable.java:10903io.reactivex.Observable.subscribe	
ObservableSubscribeOn.java:96io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run	
ScheduledDirectTask.java:38io.reactivex.internal.schedulers.ScheduledDirectTask.call	
ScheduledDirectTask.java:26io.reactivex.internal.schedulers.ScheduledDirectTask.call	
FutureTask.java:266java.util.concurrent.FutureTask.run	
ScheduledThreadPoolExecutor.java:301java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run	
ThreadPoolExecutor.java:1162java.util.concurrent.ThreadPoolExecutor.runWorker	
ThreadPoolExecutor.java:636java.util.concurrent.ThreadPoolExecutor$Worker.run	
Thread.java:764java.lang.Thread.run	
Caused By: java.lang.IllegalStateException · invoke(...) must not be null
Unknown:9com.estimote.proximity_sdk.proximity.EstimoteProximityObserverKt$sam$Consumer$495c82aa.accept	
LambdaObserver.java:77io.reactivex.internal.observers.LambdaObserver.onError	
ObservableObserveOn.java:276io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated	
ObservableObserveOn.java:172io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal	
ObservableObserveOn.java:252io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run	
HandlerScheduler.java:109io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run	
Handler.java:790android.os.Handler.handleCallback	
Handler.java:99android.os.Handler.dispatchMessage	
Looper.java:164android.os.Looper.loop	
ActivityThread.java:6494android.app.ActivityThread.main	
Method.java:-2java.lang.reflect.Method.invoke	
RuntimeInit.java:438com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run	
ZygoteInit.java:807com.android.internal.os.ZygoteInit.main

@heypiotr
Copy link
Contributor

heypiotr commented Aug 3, 2018

In 0.4.0, Android apps will no longer crash if there are no beacons in Estimote Cloud matching the tags given. (You'll still get a warning/error logged in logcat.)

@heypiotr heypiotr closed this as completed Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
native Resolution depends on the native SDK
Projects
None yet
Development

No branches or pull requests

4 participants