polymorphicshade / NewPipe

A fork of NewPipe with SponsorBlock functionality.
GNU General Public License v3.0
3.2k stars 104 forks source link

Crash when trying to open an upcoming video #233

Closed remi-dupre closed 2 years ago

remi-dupre commented 2 years ago

Checklist

Affected version

0.23.3

Steps to reproduce the bug

  1. Open a channel with an upcoming video (eg. lemonde until tomorrow)
  2. Click on an upcoming video

Expected behavior

I think there are two ways this could be handle:

  1. Upcoming videos are not clickable when displayed in a channel or "what's new" views or anywere else (there is probably also an edge case one opening such a video by link)
  2. The app would support opening upcoming videos, without a player but still the comment section and description

Also it would be cool if the fact that the video is not released yet was more obvious in the lists, for example making it grayed out.

Actual behavior

A crash screen appears when clicking the video

Screenshots/Screen recordings

No response

Logs

Exception

org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException: Got error: "Premieres in 39 hours"
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.checkPlayabilityStatus(YoutubeStreamExtractor.java:909)
    at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:814)
    at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:60)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:78)
    at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:73)
    at org.schabi.newpipe.util.ExtractorHelper.lambda$getStreamInfo$3(ExtractorHelper.java:118)
    at org.schabi.newpipe.util.ExtractorHelper.$r8$lambda$YTHJjScxCJNO1LTCqs3IKy35iyY(Unknown Source:0)
    at org.schabi.newpipe.util.ExtractorHelper$$ExternalSyntheticLambda6.call(Unknown Source:4)
    at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess.subscribeActual(SingleDoOnSuccess.java:35)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle.subscribeActual(MaybeFromSingle.java:41)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.drain(MaybeConcatArray.java:153)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.request(MaybeConcatArray.java:78)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onSubscribe(FlowableElementAtMaybe.java:66)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray.subscribeActual(MaybeConcatArray.java:42)
    at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15868)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
    at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
    at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
    at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)


Affected Android/Custom ROM version

/e/OS 1.2 (android 10)

Affected device model

Fairphone 3

Additional information

No response

Atemu commented 2 years ago

That has nothing to do with this fork.

Put this upstream.

remi-dupre commented 2 years ago

Oh crap, I'm so sorry, wrote this on my phone so I didn't notice that the link in the app was linking to the fork.

Sorry for the inconveniences, I'll re-open it in upstream (if required, there are much more issues in upstream).

EDIT: I can't open any issue in upstream, but it's a rather minor bug and with 1k+ opened issues I suppose mainteners already have plenty of things to do 😬