lavalink-devs / Lavalink

Standalone audio sending node based on Lavaplayer.
https://lavalink.dev/
MIT License
1.58k stars 668 forks source link

Loading information for a YouTube track failed. #212

Closed Akuba- closed 5 years ago

Akuba- commented 5 years ago

Describe the bug

When trying to play a Youtube video from a youtube link, Lavalink does fail. However, only giving the ID of the video works sometimes Example: https://www.youtube.com/watch?v=iKnwVvXkWq0 Does not work https://www.youtu.be/iKnwVvXkWq0 Does not work iKnwVvXkWq0 Works sometimes Lavalink version used: 1.3.17 Client used: Lavalink.py 3.0.0


com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Loading information for a YouTube track failed.
        at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:43) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:217) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadFromUrlWithVideoId(YoutubeAudioSourceManager.java:307) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadFromMainDomain(YoutubeAudioSourceManager.java:244) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadNonSearch(YoutubeAudioSourceManager.java:314) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:189) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:128) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218) ~[lavaplayer-1.3.17.jar!/:na]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:844) ~[na:na]
Caused by: java.lang.NullPointerException: null
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:213) ~[lavaplayer-1.3.17.jar!/:na]
        ... 12 common frames omitted

2019-07-31 09:06:57.528 ERROR 20251 --- [ader-2-thread-1] lavalink.server.player.AudioLoader       : Load failed

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Loading information for a YouTube track failed.
        at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:43) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:217) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadFromUrlWithVideoId(YoutubeAudioSourceManager.java:307) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadFromMainDomain(YoutubeAudioSourceManager.java:244) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadNonSearch(YoutubeAudioSourceManager.java:314) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:189) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:128) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419) ~[lavaplayer-1.3.17.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218) ~[lavaplayer-1.3.17.jar!/:na]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:844) ~[na:na]
Caused by: java.lang.NullPointerException: null
        at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadTrackWithVideoId(YoutubeAudioSourceManager.java:213) ~[lavaplayer-1.3.17.jar!/:na]
        ... 12 common frames omitted
freyacodes commented 5 years ago

This is caused by a change on YouTube's end that occurred yesterday. I quickly submitted a patch to Lavaplayer to fix that, as well as update Lavalink with the new version.

You are using an old Lavalink. Until now the fixed version was available on the CI server. To prevent confusion, I have drafted a formal release.

https://github.com/Frederikam/Lavalink/releases/tag/3.2.1.1

Akuba- commented 5 years ago

Works as expected now. Didn't bother to check the CI server since I found releases here. Was not expecting them to be out of date. I will check the CI server first next time.