-
Notifications
You must be signed in to change notification settings - Fork 160
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
Several rxjava3 exceptions (OnErrorNotImplementedException and UndeliverableException) #300
Comments
Thanks for the report @biosignalssolutions, let's figure out fix for this. The version of Polar BLE SDK is 3.3.2 or older? Is the crash happening only with certain Android version (like Android 13?) or Android version don't matter? Just to double check the CRASH : CASE 1 and CRASH : CASE 2 are independent? i.e. you see in the crashes in your crash analytics tools and the crashes are not related, those happen at different time on different users? |
I figured out the CASE 1 and CASE 2 are separate issues. CASE 1 shall be now fixed in release 3.3.3. I was able to reproduce the CASE 2, but I need some time to figure out the root cause and proper fix. |
Hello, Thanks for your quick replay. The version of Polar BLE SDK is 3.3.2 I'm not sure that origin of the problem is from the Polar SDK. I attach some image statistics, but the images contain data of other crashes. CRASH CASE 1: (6 users affected) CRASH CASE 2: (14 users affected) Just another crash Type smilar crash Thanks! |
Thanks a lot for the insight @biosignalssolutions, I will take a look for CRASH CASE 3 and CRASH CASE 4 as well.
|
Hi, Have you figure out the issue of CASE 2? |
thanks for update. CASE2 to CASE4 looks like coming from same root cause. I have spent some time to figure out the exact root, but haven't pin point it yet. I will continue the investigations on this during coming days. |
Hi Jukka, I updated the sdk version to 3.3.3 and minSdkVersion 24, but the exception still remain. I noticed there is a new version of rxjava3, from 3.1.3 to 3.1.5 thanks, Exeception using sdk version 3.3.3. Identical to CASE 2 |
Hi Toni, sorry for delayed answer. The reproduce steps are like this, but the steps needs retries still to get error to happen. With example app the problem occurs like this: Pre step:
Steps:
Observed behavior:
I am quite confident the CASE2-CASE4 are all bugs in PolarBleSDK, I have some kind of clue what is happening in the SDK, but haven't been able to make the fix for the bugs yet. You may update the RxJava from 3.1.3 to 3.1.5 but I suspect the problem won't disappear. |
Hi Jukka, I've tried causing the Execption, but no luck. Reviewing the google play logs, I have observed another sensibly different exception, CASE 5. Maybe it can help you. Thank you very much for your effort and dedication, I know that intermittent failures are very difficult to found. Have a nice day. PD: CASE 5 |
Thanks Toni for sharing the information, very valuable. The problems you have reported (i.e. CASE1-CASE4) were new findings. The CASE5 I will take a look. I have kept couple investigation sessions with the cases2-4, but unfortunately haven't yet been able to spent enough time on them to make the break through. |
Any updates on this issue? Our application is also affected. |
No news. api.requestStreamSettings(deviceId, PolarBleApi.DeviceStreamingFeature.ECG) |
Guys, we haven't forget you and we are following this thread. At some point I thought I can reliably reproduce the issue, but I was too early on that statement. I roughly know the area where the problem is, but still the root cause remains mystery. Due to up coming 5.0.0 release there will be changes on API and also SDK is refacted behind the scenes. The refactoring will touch on the parts of the code where the problem is. 5.0.0 maybe won't fix the issue, but I hope we will get better insights what is going on if bug still appears. |
Okay, Houston! we can verify some of readings for you. ( Apollo 13 ) |
Hi, Can you check the NullPointerException attached? Probably because an object is being accessed that its value is null. Perhaps this situation leaves the comunication in an unstable state. On the other hand, there are new versions of rxjava3, maybe polar-ble-sdk library uses an old version. Or these libraries only are loaded from application build.gradle file? implementation 'io.reactivex.rxjava3:rxjava:3.1.6' Thanks in advance. Exception java.lang.NullPointerException: |
Hi @biosignalssolutions, on which version of the Polar BLE SDK you noticed the latest observation? |
Hi, In v3.3.3 Thank you, |
Thanks Toni for the information. Can you reproduce the crash, or do you see it the crash in analytics? The area where the crash comes is enhanced in release v4.0.0. Are you able to migrate from Polar BLE SDK v3.3.3 to v4.0.0? |
…ct. There are cases the Rx observer is already disposed, but still the error is tried to emit for the observer.
Finally some light on this thread. The cases 3 and 4 shall be fixed in release 5.0.1. |
Hi! We are glad to know that the project has continuous improvements ;-) |
After several weeks testing no more crashes due OnErrorNotImplementedException, UndeliverableException |
Platform on which you observed the bug:
Device on which you observed the bug:
Describe the bug
The last 28 days there is an icrease of crahses (17 events) in reports of Google play console
How to Reproduce
I don't know how reproduce
Expected behavior
Maybe sometines the connection is lost
Screenshots and logs
CRASH : CASE 1
io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException
Exception io.reactivex.rxjava3.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.lang.NullPointerException
at io.reactivex.rxjava3.internal.observers.EmptyCompletableObserver.onError (EmptyCompletableObserver.java:50)
at io.reactivex.rxjava3.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.onError (CompletableSubscribeOn.java:74)
at io.reactivex.rxjava3.internal.operators.completable.CompletableFromAction.subscribeActual (CompletableFromAction.java:40)
at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2859)
at io.reactivex.rxjava3.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.run (CompletableSubscribeOn.java:64)
at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run (HandlerScheduler.java:123)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:237)
at android.app.ActivityThread.main (ActivityThread.java:8090)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:967)
Caused by java.lang.NullPointerException:
at com.polar.sdk.impl.BDBleApiImpl.deviceStateMonitorObserver$lambda-63$lambda-61 (BDBleApiImpl.kt:868)
at com.polar.sdk.impl.BDBleApiImpl.$r8$lambda$gDQgw_Ntp7iiyDa21L7nkc7mIzA
at com.polar.sdk.impl.BDBleApiImpl$$ExternalSyntheticLambda67.run
at io.reactivex.rxjava3.internal.operators.completable.CompletableFromAction.subscribeActual (CompletableFromAction.java:36)
CRASH : CASE 2
io.reactivex.rxjava3.exceptions.UndeliverableException
Exception io.reactivex.rxjava3.exceptions.UndeliverableException:
at io.reactivex.rxjava3.plugins.RxJavaPlugins.onError (RxJavaPlugins.java:372)
at io.reactivex.rxjava3.internal.util.AtomicThrowable.tryAddThrowableOrReport (AtomicThrowable.java:52)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.innerError (FlowableFlatMap.java:564)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.onError (FlowableFlatMap.java:636)
at io.reactivex.rxjava3.internal.operators.single.SingleToFlowable$SingleToFlowableObserver.onError (SingleToFlowable.java:68)
at io.reactivex.rxjava3.internal.operators.single.SingleDelayWithCompletable$OtherObserver.onError (SingleDelayWithCompletable.java:64)
at io.reactivex.rxjava3.internal.operators.completable.CompletableAndThenCompletable$SourceObserver.onError (CompletableAndThenCompletable.java:62)
at io.reactivex.rxjava3.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.onError (CompletableSubscribeOn.java:74)
at io.reactivex.rxjava3.internal.operators.completable.CompletableCreate$Emitter.tryOnError (CompletableCreate.java:91)
at com.polar.androidcommunications.api.ble.model.gatt.BleGattBase.lambda$waitNotificationEnabled$1$com-polar-androidcommunications-api-ble-model-gatt-BleGattBase (BleGattBase.java:417)
at com.polar.androidcommunications.api.ble.model.gatt.BleGattBase$$ExternalSyntheticLambda1.subscribe
at io.reactivex.rxjava3.internal.operators.completable.CompletableCreate.subscribeActual (CompletableCreate.java:40)
at io.reactivex.rxjava3.core.Completable.subscribe (Completable.java:2859)
at io.reactivex.rxjava3.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.run (CompletableSubscribeOn.java:64)
at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run (Scheduler.java:644)
at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run (ScheduledRunnable.java:65)
at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call (ScheduledRunnable.java:56)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:923)
Caused by com.polar.androidcommunications.api.ble.exceptions.BleDisconnected:
at com.polar.androidcommunications.api.ble.model.gatt.BleGattBase.lambda$waitNotificationEnabled$1$com-polar-androidcommunications-api-ble-model-gatt-BleGattBase (BleGattBase.java:404)
The text was updated successfully, but these errors were encountered: