TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.43k stars 3.06k forks source link

UI Crash When Navigating to Channel from Download Prompt #11468

Open dragnev-dev opened 2 months ago

dragnev-dev commented 2 months ago

Checklist

Affected version

0.27.2

Steps to reproduce the bug

  1. Search for any keyword. Make sure you get videos and at least one channel as results
  2. Request a download for a video
  3. Before the prompt with video quality shows up, tap on a channel. The time interval for this on my device is around 2-3 secs

Expected behavior

Download prompt and opening a channel should work

Actual behavior

UI crash

Screenshots/Screen recordings

https://github.com/user-attachments/assets/6ad1eb14-e27d-4dc9-9b4d-ff3202ef461c

Logs

Exception

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
    at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1632)
    at androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1672)
    at androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:341)
    at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:306)
    at androidx.fragment.app.DialogFragment.show(DialogFragment.java:507)
    at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry.lambda$static$16(StreamDialogDefaultEntry.java:119)
    at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry.$r8$lambda$E-BGm7Z2EfgISHn-yX4TCRIhxak(StreamDialogDefaultEntry.java:0)
    at org.schabi.newpipe.info_list.dialog.StreamDialogDefaultEntry$$ExternalSyntheticLambda20.accept(R8$$SyntheticClass:0)
    at org.schabi.newpipe.util.SparseItemUtil.lambda$fetchStreamInfoAndSaveToDatabase$4(SparseItemUtil.java:121)
    at org.schabi.newpipe.util.SparseItemUtil.$r8$lambda$cfmnXoy0qdCzt8EeO-smvalxWsM(SparseItemUtil.java:0)
    at org.schabi.newpipe.util.SparseItemUtil$$ExternalSyntheticLambda0.accept(R8$$SyntheticClass:0)
    at io.reactivex.rxjava3.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:62)
    at io.reactivex.rxjava3.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:81)
    at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8501)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:554)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)


Affected Android/Custom ROM version

Android 14 / SuperiorOS fourteen

Affected device model

Redmi Note 5 AI

Additional information

Window Animation Scale 0.0x Transition Animation Scale 0.0x Animator Duration Scale 0.0x

Debzoti commented 2 months ago

i just updated the app and issue is gone.see for updates in your app.

dragnev-dev commented 2 months ago

i just updated the app and issue is gone.see for updates in your app.

No updates found

opusforlife2 commented 1 month ago

What happened? Did the bug go away?

dragnev-dev commented 1 month ago

No, I was on mobile. I'm not familiar with the GitHub UI so I mistakenly thought what would be a button to be a drop-down.

opusforlife2 commented 1 month ago

Okay. Please post a screen record of the crash.

dragnev-dev commented 1 month ago

Added

opusforlife2 commented 3 weeks ago

Thanks! Does this happen only with channels? Or also feeds, playlists, etc.?

dragnev-dev commented 2 weeks ago

Does this happen only with channels? Or also feeds, playlists, etc.?

Ok so which scenarios also trigger the bug. The OP scenario is you long press a video, tap download, then you navigate to a channel before the prompt for the download appears on the screen. Furthermore, cases which trigger the crash after requesting a download are:

opusforlife2 commented 2 weeks ago

Ok, so it happens when Newpipe opens an entirely new fragment. Thanks for testing!

ShareASmile commented 2 weeks ago

Ok, so it happens when Newpipe opens an entirely new fragment.

Yes, it is related to downloader see #3163 & it is old one https://github.com/TeamNewPipe/NewPipe/issues?q=is%3Aissue+Can+not+perform+this+action+after+onSaveInstanceState+

elvakang commented 6 days ago

May I have this issue assigned to me? I can try to fix it.

ShareASmile commented 6 days ago

@elvakang You can do so, but there's a low probability of them being reviewed any time soon. If you're still okay with that, please go ahead!