question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[SOLVED?] `sample-mvi` crashes on Start

See original GitHub issue

When i start it on Android Studio 3.1.2, app crashes with stack like this:

05-28 10:23:15.357 28499-28499/com.hannesdorfmann.mosby3.sample.mvi E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.hannesdorfmann.mosby3.sample.mvi, PID: 28499
    java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.
        at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:111)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
     Caused by: java.lang.IllegalStateException: ViewState observable must not reach error state - onError()
        at com.hannesdorfmann.mosby3.mvi.DisposableViewStateObserver.onError(DisposableViewStateObserver.java:22)
        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.checkTerminated(ObservableObserveOn.java:276)
        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:172)
        at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:252)
        at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
        at android.os.Handler.handleCallback(Handler.java:751) 
        at android.os.Handler.dispatchMessage(Handler.java:95) 
        at android.os.Looper.loop(Looper.java:154) 
        at android.app.ActivityThread.main(ActivityThread.java:6119) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 
     Caused by: java.lang.IllegalStateException: Only a single observer allowed.
        at io.reactivex.subjects.UnicastSubject.subscribeActual(UnicastSubject.java:150)
        at io.reactivex.Observable.subscribe(Observable.java:10700)
        at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.subscribeInner(ObservableFlatMap.java:162)
        at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.onNext(ObservableFlatMap.java:139)
        at io.reactivex.internal.operators.observable.ObservableFromArray$FromArrayDisposable.run(ObservableFromArray.java:107)
        at io.reactivex.internal.operators.observable.ObservableFromArray.subscribeActual(ObservableFromArray.java:36)
        at io.reactivex.Observable.subscribe(Observable.java:10700)
        at io.reactivex.internal.operators.observable.ObservableFlatMap.subscribeActual(ObservableFlatMap.java:55)
        at io.reactivex.Observable.subscribe(Observable.java:10700)
        at io.reactivex.internal.operators.observable.ObservableDoOnEach.subscribeActual(ObservableDoOnEach.java:42)
        at io.reactivex.Observable.subscribe(Observable.java:10700)
        at io.reactivex.internal.operators.observable.ObservableConcatMap$ConcatMapDelayErrorObserver.drain(ObservableConcatMap.java:467)
        at io.reactivex.internal.operators.observable.ObservableConcatMap$ConcatMapDelayErrorObserver.onSubscribe(ObservableConcatMap.java:325)
        at io.reactivex.internal.operators.observable.ObservableFromArray.subscribeActual(ObservableFromArray.java:30)
        at io.reactivex.Observable.subscribe(Observable.java:10700)
        at io.reactivex.internal.operators.observable.ObservableConcatMap.subscribeActual(ObservableConcatMap.java:54)
        at io.reactivex.Observable.subscribe(Observable.java:10700)
        at io.reactivex.internal.operators.observable.ObservableCombineLatest$LatestCoordinator.subscribe(ObservableCombineLatest.java:119)
        at io.reactivex.internal.operators.observable.ObservableCombineLatest.subscribeActual(ObservableCombineLatest.java:73)
        at io.reactivex.Observable.subscribe(Observable.java:10700)
        at io.reactivex.internal.operators.observable.ObservableObserveOn.subscribeActual(ObservableObserveOn.java:45)
        at io.reactivex.Observable.subscribe(Observable.java:10700)
        at io.reactivex.Observable.subscribeWith(Observable.java:10751)
        at com.hannesdorfmann.mosby3.mvi.MviBasePresenter.subscribeViewState(MviBasePresenter.java:366)
        at com.hannesdorfmann.mosby3.sample.mvi.view.shoppingcartoverview.ShoppingCartOverviewPresenter.bindIntents(ShoppingCartOverviewPresenter.java:108)
        at com.hannesdorfmann.mosby3.mvi.MviBasePresenter.attachView(MviBasePresenter.java:248)
        at com.hannesdorfmann.mosby3.FragmentMviDelegateImpl.onStart(FragmentMviDelegateImpl.java:161)
        at com.hannesdorfmann.mosby3.mvi.MviFragment.onStart(MviFragment.java:91)
        at android.support.v4.app.Fragment.performStart(Fragment.java:2287)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1458)
        at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1750)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1819)
        at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3227)
        at android.support.v4.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:3186)
        at android.support.v4.app.FragmentController.dispatchStart(FragmentController.java:203)
        at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:582)
        at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:177)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1248)
        at android.app.Activity.performStart(Activity.java:6696)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2628)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
        at android.app.ActivityThread.-wrap12(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        	... 5 more

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
drbear95commented, Jun 25, 2019

What is the status of this case?

0reactions
paul-wagcommented, Dec 21, 2021

Wish this had a solution…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do my apps keep crashing on Android, How to fix it
To do this, go to Settings -> Apps and select the app that keeps crashing. Tap on the app's name and then tap...
Read more >
Visual Studio crash at start-up - Stack Overflow
Solution is to start in safe mode, show toolbar, then restart normally. – Ashley. Apr 22, 2015 at 17:48. 1.
Read more >
What to Do If Apps Keep Crashing on an Android Device
1. Start the Settings app. · 2. Tap Apps & notifications. · 3. Find the crashing app in the list of apps. You...
Read more >
Resolve Acrobat intermittent crashes on Windows
How to fix intermittent Adobe Acrobat crashes on Windows. ... Solution 4: Launch Acrobat Distiller and check if Acrobat is activated.
Read more >
Crashes | Android Developers
Solving crashes can be difficult. ... beginning of crash AndroidRuntime: FATAL EXCEPTION: main Process: com.android.developer.crashsample, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found