grox
grox copied to clipboard
Grox doesn't notify anyone when an action produces an error when trying to change the state
Grox store don't call any listener / "subscriber of the states(store)" when an error happens during the action's newState method. The errors seem to just be swallowed by Grox.
Here is an example stackTrace:
at com.groupon.newdealdetails.local.grox.RefreshDealAction.newState(RefreshDealAction.java:47)
at com.groupon.newdealdetails.local.grox.RefreshDealAction.newState(RefreshDealAction.java:16)
at com.groupon.grox.Store$CallReducerMiddleware.intercept(Store.java:186)
at com.groupon.grox.RealMiddlewareChain.proceed(RealMiddlewareChain.java:76)
at com.groupon.misc.DebugMiddlewareChain.logStateAndAction(DebugMiddlewareChain.java:44)
at com.groupon.misc.DebugMiddlewareChain.intercept(DebugMiddlewareChain.java:31)
at com.groupon.grox.RealMiddlewareChain.proceed(RealMiddlewareChain.java:76)
at com.groupon.grox.Store$NotifySubscribersMiddleware.intercept(Store.java:198)
at com.groupon.grox.RealMiddlewareChain.proceed(RealMiddlewareChain.java:76)
at com.groupon.grox.Store.emitSequentially(Store.java:86)
at com.groupon.grox.Store.dispatch(Store.java:79)
at com.groupon.newdealdetails.local.LocalDealDetailsFragment$$Lambda$10.call(Unknown Source:4)
at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134)
at rx.internal.operators.OnSubscribeOnAssembly$OnAssemblySubscriber.onNext(OnSubscribeOnAssembly.java:124)
at rx.observers.SerializedObserver.onNext(SerializedObserver.java:91)
at rx.observers.SerializedSubscriber.onNext(SerializedSubscriber.java:94)
at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.innerNext(OnSubscribeConcatMap.java:182)
at rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerSubscriber.onNext(OnSubscribeConcatMap.java:335)
at rx.internal.operators.OnSubscribeOnAssembly$OnAssemblySubscriber.onNext(OnSubscribeOnAssembly.java:124)
at rx.internal.producers.SingleProducer.request(SingleProducer.java:65)
at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
at rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerSubscriber.setProducer(OnSubscribeConcatMap.java:329)
at rx.Subscriber.setProducer(Subscriber.java:205)
at rx.internal.operators.SingleLiftObservableOperator$WrapSubscriberIntoSingle.onSuccess(SingleLiftObservableOperator.java:76)
at rx.internal.operators.OnSubscribeOnAssemblySingle$OnAssemblySingleSubscriber.onSuccess(OnSubscribeOnAssemblySingle.java:70)
at rx.internal.operators.SingleOnErrorReturn$OnErrorReturnsSingleSubscriber.onSuccess(SingleOnErrorReturn.java:61)
at rx.internal.operators.OnSubscribeOnAssemblySingle$OnAssemblySingleSubscriber.onSuccess(OnSubscribeOnAssemblySingle.java:70)
at rx.internal.operators.SingleOnSubscribeMap$MapSubscriber.onSuccess(SingleOnSubscribeMap.java:74)
at rx.internal.operators.OnSubscribeOnAssemblySingle$OnAssemblySingleSubscriber.onSuccess(OnSubscribeOnAssemblySingle.java:70)
at rx.internal.operators.SingleDoOnEvent$SingleDoOnEventSubscriber.onSuccess(SingleDoOnEvent.java:63)
at rx.internal.operators.OnSubscribeOnAssemblySingle$OnAssemblySingleSubscriber.onSuccess(OnSubscribeOnAssemblySingle.java:70)
at rx.Single$13$1$1.onSuccess(Single.java:2021)
at rx.internal.operators.OnSubscribeOnAssemblySingle$OnAssemblySingleSubscriber.onSuccess(OnSubscribeOnAssemblySingle.java:70)
at rx.internal.operators.SingleFromCallable.call(SingleFromCallable.java:48)
at rx.internal.operators.SingleFromCallable.call(SingleFromCallable.java:29)
at rx.internal.operators.OnSubscribeOnAssemblySingle.call(OnSubscribeOnAssemblySingle.java:47)
at rx.internal.operators.OnSubscribeOnAssemblySingle.call(OnSubscribeOnAssemblySingle.java:28)
at rx.Single.subscribe(Single.java:1967)
at rx.Single$13$1.call(Single.java:2039)
at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.Futu
@stephanenicolas I tried to reproduce this using the sample app and throw an exception inside newState. The onError was called correctly.