fossasia / open-event-droidgen

Open Event Android App Generator https://github.com/fossasia/open-event-android/raw/apk/sample-apk-fossasia17-development.apk
GNU General Public License v3.0
2.06k stars 828 forks source link

Crash: App crashes on reload in live feed activity when no posts is there #2362

Closed ParthivMangukiya closed 6 years ago

ParthivMangukiya commented 6 years ago

Actual Behaviour

App crashes on reload in live feed activity when no posts is there.

Expected Behaviour

App should not crash on reloading when no posts is there.

Steps to reproduce it

  1. Generate apk from googleio17 sample provided here : https://github.com/fossasia/open-event/blob/master/sample/GoogleIO17.zip
  2. Go to live Feed activity.
  3. After Downloading Live Feed pop up close,Try to reload feed by swipe down.

LogCat for the issue

03-10 15:29:43.022 15513-15513/org.fossasia.openevent.GoogleIO2017 E/AndroidRuntime: FATAL EXCEPTION: main Process: org.fossasia.openevent.GoogleIO2017, PID: 15513 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:6692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) Caused by: java.lang.RuntimeException: LiveData does not handle errors. Errors from publishers should be handled upstream and propagated as state at android.arch.lifecycle.LiveDataReactiveStreams$PublisherLiveData$LiveDataSubscriber$1.run(LiveDataReactiveStreams.java:262) at android.arch.core.executor.TaskExecutor.executeOnMainThread(TaskExecutor.java:54) at android.arch.lifecycle.LiveDataReactiveStreams$PublisherLiveData$LiveDataSubscriber.onError(LiveDataReactiveStreams.java:258) at io.reactivex.internal.util.HalfSerializer.onError(HalfSerializer.java:70) at io.reactivex.internal.subscribers.StrictSubscriber.onError(StrictSubscriber.java:103) at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.checkTerminated(FlowableOnBackpressureBuffer.java:235) at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.drain(FlowableOnBackpressureBuffer.java:166) at io.reactivex.internal.operators.flowable.FlowableOnBackpressureBuffer$BackpressureBufferSubscriber.onError(FlowableOnBackpressureBuffer.java:123) at io.reactivex.internal.operators.flowable.FlowableFromObservable$SubscriberObserver.onError(FlowableFromObservable.java:47) 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:6692)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)  Caused by: retrofit2.adapter.rxjava2.HttpException: HTTP 404 at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:54) at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:37) at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:43) at io.reactivex.Observable.subscribe(Observable.java:10903) at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34) at io.reactivex.Observable.subscribe(Observable.java:10903) at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452) at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:61) at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:52) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:762)

Screenshots of the issue

20180310_152430

Would you like to work on the issue?

yes

sriramr98 commented 6 years ago

@ParthivMangukiya Are you working on this issue? If not I would like to take up this issue.

ParthivMangukiya commented 6 years ago

@sriramr98 I was busy recently. Yes I'm working on this issue. I'll update the status soon