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

Playing Youtube audio does not work (Invalid status code for search response: 400) #6308

Closed
nfp0 opened this issue Mar 16, 2024 · 1 comment
Labels
Status: Needs Triage This has not been labeled or discussed for handling yet. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.

Comments

@nfp0
Copy link

nfp0 commented Mar 16, 2024

What Red version are you using?

3.5.5

Cog name

Audio

Command name

play

What did you expect to happen?

I expect the bot to search and play music from Youtube.

What actually happened?

No music is played and the bot replies with:

Nothing found.
Something went wrong when looking up the track

More details in the logs I posted below that I extracted with the audioset logs command.

I have noticed something that seems related to this might have been fixed on Lavalink here: lavalink-devs/lavaplayer#70

How can we reproduce this error?

  1. Do a clean bot installation.
  2. Enable the audio cog.
  3. Run a command such as play nothing else matters.

Anything else?

Log extracted with audioset logs right after the error occurred.

2024-03-15 23:24:32.983  INFO 114 --- [XNIO-1 task-1] l.server.player.AudioLoaderRestHandler   : Got request to load for identifier "ytsearch:nothing else matters"
2024-03-15 23:24:33.127 ERROR 114 --- [lava-daemon-pool-info-loader-2-thread-1] c.s.d.l.p.DefaultAudioPlayerManager      : Error in loading item ytsearch:nothing else matters

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something went wrong when looking up the track
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:44) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.dispatchItemLoadFailure(DefaultAudioPlayerManager.java:227) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:216) ~[lavaplayer-1.5.0.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:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
	Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation: 
  lavaplayer.version: 1.5.0
  os.arch: amd64
  os.name: Linux
  os.version: 6.6.18-1-lts
  java.vendor: Debian
  java.version: 11.0.22
  java.runtime.version: 11.0.22+7-post-Debian-1deb11u1
  java.vm.version: 11.0.22+7-post-Debian-1deb11u1
Caused by: java.lang.RuntimeException: java.io.IOException: Invalid status code for search response: 400
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:58) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.loadSearchResult(YoutubeSearchProvider.java:70) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.search(YoutubeAudioSourceManager.java:282) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.search(YoutubeAudioSourceManager.java:248) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.route(DefaultYoutubeLinkRouter.java:37) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:216) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:147) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:428) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:410) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:208) ~[lavaplayer-1.5.0.jar!/:na]
	... 4 common frames omitted
Caused by: java.io.IOException: Invalid status code for search response: 400
	at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.assertSuccessWithContent(HttpClientTools.java:157) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.loadSearchResult(YoutubeSearchProvider.java:62) ~[lavaplayer-1.5.0.jar!/:na]
	... 12 common frames omitted

2024-03-15 23:24:33.128 ERROR 114 --- [lava-daemon-pool-info-loader-2-thread-1] lavalink.server.player.AudioLoader       : Load failed

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something went wrong when looking up the track
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:44) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.dispatchItemLoadFailure(DefaultAudioPlayerManager.java:227) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:216) ~[lavaplayer-1.5.0.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:1128) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
	Suppressed: com.sedmelluq.discord.lavaplayer.tools.exception.EnvironmentInformation: 
  lavaplayer.version: 1.5.0
  os.arch: amd64
  os.name: Linux
  os.version: 6.6.18-1-lts
  java.vendor: Debian
  java.version: 11.0.22
  java.runtime.version: 11.0.22+7-post-Debian-1deb11u1
  java.vm.version: 11.0.22+7-post-Debian-1deb11u1
Caused by: java.lang.RuntimeException: java.io.IOException: Invalid status code for search response: 400
	at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:58) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.loadSearchResult(YoutubeSearchProvider.java:70) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.search(YoutubeAudioSourceManager.java:282) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager$LoadingRoutes.search(YoutubeAudioSourceManager.java:248) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.DefaultYoutubeLinkRouter.route(DefaultYoutubeLinkRouter.java:37) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItemOnce(YoutubeAudioSourceManager.java:216) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager.loadItem(YoutubeAudioSourceManager.java:147) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:428) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:410) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:208) ~[lavaplayer-1.5.0.jar!/:na]
	... 4 common frames omitted
Caused by: java.io.IOException: Invalid status code for search response: 400
	at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.assertSuccessWithContent(HttpClientTools.java:157) ~[lavaplayer-1.5.0.jar!/:na]
	at com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider.loadSearchResult(YoutubeSearchProvider.java:62) ~[lavaplayer-1.5.0.jar!/:na]
	... 12 common frames omitted
@nfp0 nfp0 added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label Mar 16, 2024
@github-actions github-actions bot added the Status: Needs Triage This has not been labeled or discussed for handling yet. label Mar 16, 2024
@Flame442
Copy link
Member

Fixed when #6305 is merged and a new Red release is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage This has not been labeled or discussed for handling yet. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

No branches or pull requests

2 participants