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

No Playability Status Block - Loading Information for a YouTube Track Failed #690

Closed
dolanbernard opened this issue Apr 6, 2022 · 10 comments

Comments

@dolanbernard
Copy link

dolanbernard commented Apr 6, 2022

I'm seeing a completely different JSON error than everybody else, apparently. For some reason it looks like it's failing to find the playabilityStatus block but, as far as I can tell from looking at the JSON, it's there. This does not get fixed by merging #687.

[JDA MainWS-ReadThread] INFO net.dv8tion.jda.internal.requests.WebSocketClient - Connected to WebSocket
[JDA MainWS-ReadThread] INFO net.dv8tion.jda.api.JDA - Finished Loading!
[lava-daemon-pool-info-loader-2-thread-1] WARN com.sedmelluq.discord.lavaplayer.tools.ExceptionTools - Error when extracting data EID: 1460bda8-9a85-4d7c-8c3e-d3aa6956d17c, mainJson: (Too long for github comment)
[lava-daemon-pool-info-loader-2-thread-1] ERROR com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager - Error in loading item https://www.youtube.com/watch?v=0_04Z-7kZ9E
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Loading information for a YouTube track failed.
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:44)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:220)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.track(YoutubeAudioSourceManager.java:232)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.track(YoutubeAudioSourceManager.java:228)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.routeFromUrlWithVideoId(DefaultYoutubeLinkRouter.java:99)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.routeFromMainDomain(DefaultYoutubeLinkRouter.java:64)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.route(DefaultYoutubeLinkRouter.java:42)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:196)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:131)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:436)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:418)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:217)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor$ChannelRunnable.executeQueue(OrderedExecutor.java:98)
	at com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor$ChannelRunnable.run(OrderedExecutor.java:87)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
	Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation: 
  lavaplayer.version: 1.3.78
  os.arch: amd64
  os.name: Linux
  os.version: 5.16.14-1-MANJARO
  java.vendor: N/A
  java.version: 17.0.3
  java.runtime.version: 17.0.3+3
  java.vm.version: 17.0.3+3
Caused by: java.lang.RuntimeException: Error when extracting data EID: 1460bda8-9a85-4d7c-8c3e-d3aa6956d17c, mainJson <redacted>
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.throwWithDebugInfo(ExceptionTools.java:134)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.load(DefaultYoutubeTrackDetailsLoader.java:62)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.loadDetails(DefaultYoutubeTrackDetailsLoader.java:37)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:208)
	... 16 more
Caused by: java.lang.RuntimeException: No playability status block.
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.checkPlayabilityStatus(DefaultYoutubeTrackDetailsLoader.java:96)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.loadBaseResponse(DefaultYoutubeTrackDetailsLoader.java:73)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.load(DefaultYoutubeTrackDetailsLoader.java:51)
	... 18 more

response

@idpromnut
Copy link

I can have a look at it later tonight; it is probably something similar in nature to #687.

@fangming-ning-sp
Copy link

I was right about to create an issue for this. I just started seeing this error today

@dolanbernard
Copy link
Author

I can have a look at it later tonight; it is probably something similar in nature to #687.

Thanks! Yeah, it's frustrating because I'm sure it's something stupid simple but I couldn't figure it out last night because I couldn't debug the lavaplayer code. Attached is the full error. I'll also be taking another look at it later tonight unless you beat me to it.
bot_err.txt

@dolanbernard
Copy link
Author

I did a quick comparison of the json from my error and the json from #688. The structure up to playabilityStatus is identical. But at the playerResponse level, mine has a few additional fields: playerAds, videoQualityPromoSupportedRenderers, and adPlacements. Pretty much everything else looks the same.

I have no idea why it could be throwing this error when the structure up to the playabilityStatus isn't different. But the presence of ad info in my error makes me wonder if this could have anything to do with ads?

@dolanbernard
Copy link
Author

I was right about to create an issue for this. I just started seeing this error today

Do you have any error logs or system information to share? I don't even know if it's a code issue at this point. Many others using the same version and getting a response of the same format aren't seeing the same issue as us.

@fangming-ning-sp
Copy link

fangming-ning-sp commented Apr 7, 2022

@dolanbernard Here's the stack trace. Before this there are two warning messages:
lavaplayer.log

2022-04-07 08:34:50.296  ERROR  aplayer.player.DefaultAudioPlayerManager : Error in loading item https://www.youtube.com/watch?v=7wtfhZwyrcc
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Loading information for a YouTube track failed.
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:44)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:220)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.track(YoutubeAudioSourceManager.java:232)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.track(YoutubeAudioSourceManager.java:228)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.routeFromUrlWithVideoId(DefaultYoutubeLinkRouter.java:99)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.routeFromMainDomain(DefaultYoutubeLinkRouter.java:64)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.route(DefaultYoutubeLinkRouter.java:42)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:196)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:131)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:436)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:418)
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:217)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor$ChannelRunnable.executeQueue(OrderedExecutor.java:98)
	at com.sedmelluq.discord.lavaplayer.tools.OrderedExecutor$ChannelRunnable.run(OrderedExecutor.java:87)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation: 
  lavaplayer.version: 1.3.77
  os.arch: amd64
  os.name: Windows 10
  os.version: 10.0
  java.vendor: Oracle Corporation
  java.version: 1.8.0_191
  java.runtime.version: 1.8.0_191-b12
  java.vm.version: 25.191-b12
Caused by: java.lang.RuntimeException: Error when extracting data EID: f724e2e9-0e51-439c-adf7-40daced460a5, mainJson <redacted>
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.throwWithDebugInfo(ExceptionTools.java:134)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.load(DefaultYoutubeTrackDetailsLoader.java:70)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.loadDetails(DefaultYoutubeTrackDetailsLoader.java:45)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:208)
	... 16 more
Caused by: java.lang.RuntimeException: Neither player nor playerResponse in result EID: e4ba8cd7-1e88-4b40-8ed7-de68490dc17f, json <redacted>
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.throwWithDebugInfo(ExceptionTools.java:134)
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeTrackJsonData.fromMainResult(YoutubeTrackJsonData.java:53)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.loadBaseResponse(DefaultYoutubeTrackDetailsLoader.java:80)
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeTrackDetailsLoader.load(DefaultYoutubeTrackDetailsLoader.java:59)
	... 18 more

@fangming-ning-sp
Copy link

fangming-ning-sp commented Apr 7, 2022

@dolanbernard Disclaimer, I have no prior experience with handling those youtube jsons but from debugging, it seems like the code here failed to find player and player response:

Here's the json it's trying to parse. It tries to look on layer deeper than that top level key playerResponse. Maybe youtube changed it's json format?

image

@fangming-ning-sp
Copy link

@dolanbernard Yeah this is exactly the same as #687.

@idpromnut Tried your PR from jitpack and it works. I'll watch closly and switch back to main branch after the PR is merged.

@dolanbernard
Copy link
Author

dolanbernard commented Apr 7, 2022

@dolanbernard Yeah this is exactly the same as #687.

@idpromnut Tried your PR from jitpack and it works. I'll watch closly and switch back to main branch after the PR is merged.

I have a completely different error. It's finding the player response but it isn't finding the block directly under it. But it's interesting to see that your response is also missing the ad related data.

I've tried the fix from that other thread and it doesn't change anything. In fact, without that fix, I don't see the same error that you were getting. I'm not even sure what else to try at this point.

@dolanbernard
Copy link
Author

dolanbernard commented Apr 7, 2022

Update: I was able to fix the issue by just removing the jitpack repository from my pom.xml. I don't know why, but that's it. I noticed that changes I made to my local repository version of lavaplayer weren't having any effect after publishing. This was frustrating because within my IDE, I could view the lavaplayer source and see my changes there.

So the version I could see in the IDE by following links in stack traces and Ctrl+Clicking would have my new code, but this isn't actually the code that was being run for some reason. I figured this out when I noticed that the version in my error messages was 1.3.78. In the version I published locally I had set version to 1.4.0. 1.4.0 was the version I selected in my pom.xml. Somehow though, just because I still had the jitpack repo in my pom.xml it was using the wrong version but not even my IDE was aware of that. I still have no idea what code WAS running in lavaplayer, so I don't even know what the error was or why it was different from the message other people were getting.

This was a weird one. I'm gonna close this issue now, but if anybody does run into the same problem I can take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants