You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It's very hard to reproduce this exception but we are seeing crashes caused by this in our production app. When notifications fail to be set up and at the same time a disconnection happens, RxJava seems to combine the two exceptions and throw a Fatal: CompositeException
To Reproduce
Steps to reproduce the behavior:
Throw exception at NotificationAndIndicationManager.java at line 241.
Disconnect the BLE peripheral
Expected behavior
Normal disconnect exception is handled and no Fatal: CompositeException that crashes the app.
Smartphone (please complete the following information):
Device: Any
OS: Any
Library version: 2.1.1
Fatal Exception: io.reactivex.exceptions.CompositeException: 2 exceptions occurred.
at io.reactivex.internal.util.ExceptionHelper.addThrowable(ExceptionHelper.java:67)
at io.reactivex.internal.util.AtomicThrowable.addThrowable(AtomicThrowable.java:34)
at io.reactivex.internal.operators.observable.ObservableFlatMap$InnerObserver.onError(ObservableFlatMap.java:585)
at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.checkTerminate(ObservableFlatMap.java:511)
at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.drainLoop(ObservableFlatMap.java:334)
at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.drain(ObservableFlatMap.java:326)
at io.reactivex.internal.operators.observable.ObservableFlatMap$InnerObserver.onError(ObservableFlatMap.java:590)
at io.reactivex.internal.disposables.EmptyDisposable.error(EmptyDisposable.java:63)
at io.reactivex.internal.operators.observable.ObservableError.subscribeActual(ObservableError.java:38)
at io.reactivex.Observable.subscribe(Observable.java:12284)
at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.subscribeInner(ObservableFlatMap.java:165)
at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.onNext(ObservableFlatMap.java:139)
at io.reactivex.internal.util.NotificationLite.accept(NotificationLite.java:246)
at io.reactivex.internal.operators.observable.ObservableReplay$UnboundedReplayBuffer.replay(ObservableReplay.java:553)
at io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver.replay(ObservableReplay.java:401)
at io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver.onNext(ObservableReplay.java:366)
at io.reactivex.internal.operators.observable.ObservableDoOnEach$DoOnEachObserver.onNext(ObservableDoOnEach.java:101)
at io.reactivex.internal.operators.observable.ObservableElementAt$ElementAtObserver.onNext(ObservableElementAt.java:86)
at com.jakewharton.rxrelay2.BehaviorRelay$BehaviorDisposable.test(BehaviorRelay.java:364)
at com.jakewharton.rxrelay2.BehaviorRelay$BehaviorDisposable.emitNext(BehaviorRelay.java:358)
at com.jakewharton.rxrelay2.BehaviorRelay.accept(BehaviorRelay.java:135)
at com.polidea.rxandroidble2.internal.connection.DisconnectionRouter.onDisconnectedException(DisconnectionRouter.java:110)
at com.polidea.rxandroidble2.internal.connection.RxBleGattCallback$2.onConnectionStateChange(RxBleGattCallback.java:81)
at android.bluetooth.BluetoothGatt$1$4.run(BluetoothGatt.java:272)
at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:780)
at android.bluetooth.BluetoothGatt.access$200(BluetoothGatt.java:41)
at android.bluetooth.BluetoothGatt$1.onClientConnectionState(BluetoothGatt.java:267)
at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:192)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)
Caused by com.polidea.rxandroidble2.exceptions.BleCannotSetCharacteristicNotificationException: Cannot write client characteristic config descriptor (code 3) with characteristic UUID ********-****-****-****-************
at com.polidea.rxandroidble2.internal.connection.NotificationAndIndicationManager$7.apply(NotificationAndIndicationManager.java:241)
at com.polidea.rxandroidble2.internal.connection.NotificationAndIndicationManager$7.apply(NotificationAndIndicationManager.java:238)
at io.reactivex.internal.operators.completable.CompletableResumeNext$ResumeNextObserver.onError(CompletableResumeNext.java:82)
at io.reactivex.internal.operators.observable.ObservableIgnoreElementsCompletable$IgnoreObservable.onError(ObservableIgnoreElementsCompletable.java:61)
at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.tryOnError(ObservableCreate.java:84)
at com.polidea.rxandroidble2.internal.serialization.ConnectionOperationQueueImpl.flushQueue(ConnectionOperationQueueImpl.java:95)
at com.polidea.rxandroidble2.internal.serialization.ConnectionOperationQueueImpl$1.run(ConnectionOperationQueueImpl.java:86)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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.polidea.rxandroidble2.exceptions.BleDisconnectedException: Disconnected from MAC='C3:94:7B:7F:57:XX' with status 8 (GATT_INSUF_AUTHORIZATION or GATT_CONN_TIMEOUT)
at com.polidea.rxandroidble2.internal.connection.RxBleGattCallback$2.onConnectionStateChange(RxBleGattCallback.java:81)
at android.bluetooth.BluetoothGatt$1$4.run(BluetoothGatt.java:272)
at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:780)
at android.bluetooth.BluetoothGatt.access$200(BluetoothGatt.java:41)
at android.bluetooth.BluetoothGatt$1.onClientConnectionState(BluetoothGatt.java:267)
at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:192)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)
The text was updated successfully, but these errors were encountered:
Describe the bug
It's very hard to reproduce this exception but we are seeing crashes caused by this in our production app. When notifications fail to be set up and at the same time a disconnection happens,
RxJava
seems to combine the two exceptions and throw aFatal: CompositeException
To Reproduce
Steps to reproduce the behavior:
NotificationAndIndicationManager.java
at line 241.Expected behavior
Normal disconnect exception is handled and no
Fatal: CompositeException
that crashes the app.Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: