StompProtocolAndroid icon indicating copy to clipboard operation
StompProtocolAndroid copied to clipboard

Disposing of topic subscription throws OnErrorNotImplementedException

Open steviemo opened this issue 7 years ago • 5 comments

If I have the app running and stop the WS server I handle the CLOSED lifecycle event and dispose of topic subscriptions - upon disposing the following error is fired:

08-24 19:17:32.301 11442-11495/co.oroson.android W/System.err: io.reactivex.exceptions.OnErrorNotImplementedException
08-24 19:17:32.301 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
08-24 19:17:32.301 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
08-24 19:17:32.301 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.subscribers.LambdaSubscriber.onError(LambdaSubscriber.java:76)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.operators.flowable.FlowableCreate$BaseEmitter.error(FlowableCreate.java:288)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.drain(FlowableCreate.java:531)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.tryOnError(FlowableCreate.java:481)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.operators.flowable.FlowableCreate$BaseEmitter.onError(FlowableCreate.java:270)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.operators.flowable.FlowableCreate.subscribeActual(FlowableCreate.java:75)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.Flowable.subscribe(Flowable.java:12995)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.Flowable.subscribe(Flowable.java:12931)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.Flowable.subscribe(Flowable.java:12791)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at ua.naiksoftware.stomp.client.StompClient.lambda$topic$3(StompClient.java:191)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at ua.naiksoftware.stomp.client.StompClient$$Lambda$7.run(Unknown Source)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.cancel(FlowableDoOnLifecycle.java:112)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.subscriptions.SubscriptionHelper.cancel(SubscriptionHelper.java:189)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.cancel(FlowableSubscribeOn.java:141)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.cancel(FlowableObserveOn.java:154)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.subscriptions.SubscriptionHelper.cancel(SubscriptionHelper.java:189)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.subscribers.LambdaSubscriber.cancel(LambdaSubscriber.java:116)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at io.reactivex.internal.subscribers.LambdaSubscriber.dispose(LambdaSubscriber.java:101)
08-24 19:17:32.302 11442-11495/co.oroson.android W/System.err:     at co.oroson.android.utils.RxBusService.maybeDispose(RxBusService.java:56)

steviemo avatar Aug 24 '17 18:08 steviemo

Just an issue for JWS. OkHttp is fine

steviemo avatar Aug 24 '17 18:08 steviemo

Hey @steviemo did we get this fixed?

forresthopkinsa avatar Sep 29 '17 22:09 forresthopkinsa

Hey, I ended up switching from JWS to OkHttp and we don’t get this particular issue. The OkHttp library seems to be a lot more robust to be honest and I’ve had a few PR’s accepted that tightened things up further. We are now using this library with OkHttp in production and it appears to be behaving well.

steviemo avatar Sep 30 '17 06:09 steviemo

Okay cool, good to know. Thanks 👍

forresthopkinsa avatar Oct 02 '17 15:10 forresthopkinsa

Use this library its working fine, replace server url and port with your custom server url and your port. https://github.com/SayyedUmar/Stomp-Android-Client

testGumar avatar May 01 '19 07:05 testGumar