NewPipeExtractor icon indicating copy to clipboard operation
NewPipeExtractor copied to clipboard

Could not store JavaScript player

Open muzzikapp opened this issue 3 years ago • 1 comments

Could not get player js code from url: https://www.youtube.com/s/player/c2199353/player_ias.vflset/en_US/base.js

image

muzzikapp avatar Aug 27 '22 20:08 muzzikapp

Do you have some details and/or the complete exceptions, including the ones which are ignored, since you're using the debugger? We saw this issue multiple times and we'd like to fix it.

Edit: your issue is a bit different, as that's when the player is fetched that the issue happen.

We could may be send more headers to make the JavaScript player request being like a request made by a web browser:

Origin: https://www.youtube.com Referer: https://www.youtube.com Sec-Fetch-Dest: script Sec-Fetch-Mode: no-cors Sec-Fetch-Site: same-origin

(And maybe do the same process for the embed YouTube HTML page and the iframe API request.)

AudricV avatar Aug 27 '22 21:08 AudricV

Ran into this error, here's the exception I got, hopefully it helps. (EDIT: Turns out one of the blocklists in my DNS resolver was updated to include youtube.com for some reason. Problem was resolved when I disabled that blocklist, so this might be a different issue than what OP encountered.)

Exception

  • User Action: requested stream
  • Request: https://www.youtube.com/watch?v=gLfdDRDc5B8
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: YouTube
  • Version: 0.24.1
  • OS: Linux Android 13 - 33
Crash log

org.schabi.newpipe.extractor.exceptions.ParsingException: Could not store JavaScript player
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.storePlayerJs(YoutubeStreamExtractor.java:1116)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.initStsFromPlayerJsIfNeeded(YoutubeStreamExtractor.java:1184)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:833)
	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$$ExternalSyntheticLambda1.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:264)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: org.schabi.newpipe.extractor.exceptions.ParsingException: Embedded info did not provide YouTube player js url
	at org.schabi.newpipe.extractor.services.youtube.YoutubeJavaScriptExtractor.extractJavaScriptUrl(YoutubeJavaScriptExtractor.java:116)
	at org.schabi.newpipe.extractor.services.youtube.YoutubeJavaScriptExtractor.extractJavaScriptCode(YoutubeJavaScriptExtractor.java:46)
	at org.schabi.newpipe.extractor.services.youtube.YoutubeJavaScriptExtractor.extractJavaScriptCode(YoutubeJavaScriptExtractor.java:65)
	at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.storePlayerJs(YoutubeStreamExtractor.java:1114)
	... 32 more


crisp5 avatar Nov 13 '22 14:11 crisp5

Closing due to lack of author's response.

AudricV avatar Apr 02 '23 15:04 AudricV

Are you on Android? I had same issue and fixed it by adding internet permission and executing http request on io thread

shalva97 avatar Oct 30 '23 17:10 shalva97