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

[YouTube] Content warning detected as "Content unavailable" #8103

Closed
5 tasks done
Tau5 opened this issue Mar 25, 2022 · 6 comments · Fixed by TeamNewPipe/NewPipeExtractor#780
Closed
5 tasks done

[YouTube] Content warning detected as "Content unavailable" #8103

Tau5 opened this issue Mar 25, 2022 · 6 comments · Fixed by TeamNewPipe/NewPipeExtractor#780
Labels
bug Issue is related to a bug requires extractor change This issue requires a change to the extractor youtube Service, https://www.youtube.com/

Comments

@Tau5
Copy link

Tau5 commented Mar 25, 2022

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.22.1

Steps to reproduce the bug

  1. Attempt to play a video with a content warning (e.g.: https://www.youtube.com/watch?v=xDPzZkx0cPs)

Expected behavior

Video should be played like with any other video or by showing the content warning before playback

Actual behavior

"Content unavailable" shows up instead of video

Screenshots/Screen recordings

In-App Error

Screenshot_2022-03-25-07-43-48-148_org schabi newpipe

Youtube Webapp content warning

Screenshot_2022-03-25-07-48-24-014_org mozilla firefox

Logs

Exception

Crash log

org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException: Got error: "null"
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.checkPlayabilityStatus(YoutubeStreamExtractor.java:790)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:715)
	at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:54)
	at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:68)
	at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:64)
	at org.schabi.newpipe.util.ExtractorHelper.lambda$getStreamInfo$3(ExtractorHelper.java:116)
	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:923)


Affected Android/Custom ROM version

Android 11 / MIUI 12.5.7

Affected device model

Xiaomi Redmi Note 10 Pro (sweet)

Additional information

Even if the content warning is accepted in the Youtube Webapp, the video is not displayed, although audio does play, I don't know if that affects the NewPipe Extractor

@Tau5 Tau5 added the bug Issue is related to a bug label Mar 25, 2022
@AudricV
Copy link
Member

AudricV commented Mar 25, 2022

This can be easily fixed by adding "contentCheckOk": true to InnerTube player requests (at the base of the JSON body).

@AudricV AudricV added youtube Service, https://www.youtube.com/ requires extractor change This issue requires a change to the extractor labels Mar 25, 2022
@litetex litetex added the good first issue Easy/simple issues perfect for newcomers to get involved in the project label Mar 25, 2022
@AudricV AudricV changed the title [Youtube] Content warning detected as "Content unavailable" [YouTube] Content warning detected as "Content unavailable" Mar 26, 2022
@AudricV AudricV removed the good first issue Easy/simple issues perfect for newcomers to get involved in the project label Apr 2, 2022
@AudricV AudricV self-assigned this Apr 2, 2022
@AudricV
Copy link
Member

AudricV commented Apr 2, 2022

Please test this APK: app-debug.zip

@RFigas
Copy link

RFigas commented Apr 5, 2022

seems to fix the issue on my end

@Tau5
Copy link
Author

Tau5 commented Apr 5, 2022

It works!

@ahmadraniri1994
Copy link

Sometimes I still get it when I paste a link though it's playable on browser.

@AudricV
Copy link
Member

AudricV commented Jun 4, 2022

Could you share the video links, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug requires extractor change This issue requires a change to the extractor youtube Service, https://www.youtube.com/
Projects
None yet
5 participants