Skip to content
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

Grox doesn't notify anyone when an action produces an error when trying to change the state #24

Open
stephanenicolas opened this issue Oct 30, 2017 · 1 comment
Labels
Milestone

Comments

@stephanenicolas
Copy link
Collaborator

stephanenicolas commented Oct 30, 2017

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 stephanenicolas added this to the 1.1.1 milestone Oct 30, 2017
@alin-turcu alin-turcu modified the milestones: 1.1.1, 1.1.2 Nov 22, 2017
@alin-turcu
Copy link
Collaborator

@stephanenicolas I tried to reproduce this using the sample app and throw an exception inside newState. The onError was called correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants