sedmelluq / lavaplayer

Audio player library for Discord
Apache License 2.0
967 stars 247 forks source link

NullPointerException when parsing Youtube URL #485

Closed IgeNiaI closed 3 years ago

IgeNiaI commented 4 years ago

Sometimes the error happens, sometimes it doesn't, although the track is the same. This started about a week ago and it gets worse over time.

The music I am trying to play is https://www.youtube.com/watch?v=DIlPaqmcklk

9953 [lava-daemon-pool-playback-1-thread-1] ERROR com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor - Error in playback of DIlPaqmcklk com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something broke when playing the track. at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:43) at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:117) at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:349) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:835) Caused by: java.lang.NullPointerException at java.base/java.net.URI$Parser.parse(URI.java:3127) at java.base/java.net.URI.<init>(URI.java:623) at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeTrackFormat.getUrl(YoutubeTrackFormat.java:66) at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSignatureCipherManager.resolveFormatUrl(YoutubeSignatureCipherManager.java:97) at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.loadBestFormatWithUrl(YoutubeAudioTrack.java:87) at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:42) at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:105) ... 4 more

charlie67 commented 4 years ago

I am also seeing this very frequently `2020-05-29 01:55:06.814 ERROR 1 --- [ack-1-thread-16] c.s.d.l.t.p.LocalAudioTrackExecutor : Error in playback of U7l8fgnXCWw

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something broke when playing the track. at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:43) ~[lavaplayer-1.3.47.jar!/:na] at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:117) ~[lavaplayer-1.3.47.jar!/:na] at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:349) ~[lavaplayer-1.3.47.jar!/:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:832) ~[na:na] Caused by: java.lang.NullPointerException: null at java.base/java.net.URI$Parser.parse(URI.java:3129) ~[na:na] at java.base/java.net.URI.(URI.java:623) ~[na:na] at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeTrackFormat.getUrl(YoutubeTrackFormat.java:66) ~[lavaplayer-1.3.47.jar!/:na] at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSignatureCipherManager.resolveFormatUrl(YoutubeSignatureCipherManager.java:97) ~[lavaplayer-1.3.47.jar!/:na] at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.loadBestFormatWithUrl(YoutubeAudioTrack.java:87) ~[lavaplayer-1.3.47.jar!/:na] at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioTrack.process(YoutubeAudioTrack.java:42) ~[lavaplayer-1.3.47.jar!/:na] at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:105) ~[lavaplayer-1.3.47.jar!/:na] ... 4 common frames omitted `

duncte123 commented 4 years ago

This is fixed in lavaplayer 1.3.49

IgeNiaI commented 4 years ago

It's not. My stacktrace is from 1.3.49 A friend of mine noticed that his Youtube video download plugin has issues as well and he can't download most videos. I suppose Youtube changed again.

duncte123 commented 4 years ago

@IgeNiaI can you show me the output of PlayerLibrary.VERSION? I don't see a version in your trace

IgeNiaI commented 4 years ago

@duncte123 it shows 1.3.47. Weird, cause I updated the version in gradle. I'll report after I fix that.

IgeNiaI commented 4 years ago

Seems to work now. Thanks!

duncte123 commented 4 years ago

Updating a number in Gradle doesn't guarantee that it's updated properly in you ide

madmagic007 commented 4 years ago

i had same issue on v 1.3.47, updating to 1.3.49 fixed the issue for me

MCOfficer commented 4 years ago

I take it this can be closed?

IgeNiaI commented 4 years ago

It can be closed, thank you.