lavalink-devs / lavaplayer

Lavaplayer fork maintained by Lavalink
Apache License 2.0
170 stars 49 forks source link

"This video is not available" on every youtube link and search #148

Closed Hubkaw closed 1 month ago

Hubkaw commented 1 month ago

Hey, I have a problem where no matter what youtube song/video i try to play, Lavaplayer throws me a FriendlyException. This issue started occuring a few weeks ago but i didint have time to check it back then. This happens both when running on Windows PC and my Ubuntu server. The exact Exception is as follows:

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: This video is not available
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.loadBestFormatWithUrl(YoutubeAudioTrack.java:87)
    at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:44)
    at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:109)
    at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$2(DefaultAudioPlayerManager.java:339)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1570)

I am using Lavaplayer for my discord bot and the exact implementation can be found here https://github.com/Hubkaw/Kuroneko-Botto/tree/main/src/main/java/com/kuroneko/lavaplayer
From what I debugged It successfully finds the requested video but then fails to assign the track details and throws that exception in YoutubeAudioTrack class. If I forgot to include any info please let me know.

devoxin commented 1 month ago

The built-in youtube source is deprecated. Use https://github.com/lavalink-devs/youtube-source.