question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LavaPlayer doesn't yet support the new Twitch API

See original GitHub issue

Starting April 30, 2020, Twitch now requires the API to be authenticated with OAuth. More information can be found here: https://dev.twitch.tv/docs/api

This is now impacting users as they can’t play Twitch streams anymore, the log outputs the following error:

2020-05-06 22:19:36.121 ERROR 4578 --- [lava-daemon-pool-info-loader-2-thread-1] lavalink.server.player.AudioLoader       : Load failed

com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Server responded with an error.
        at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.fetchResponseAsJson(HttpClientTools.java:222) ~[lavaplayer-1.3.38.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.fetchStreamChannelInfo(TwitchStreamAudioSourceManager.java:177) ~[lavaplayer-1.3.38.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.loadItem(TwitchStreamAudioSourceManager.java:75) ~[lavaplayer-1.3.38.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437) ~[lavaplayer-1.3.38.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419) ~[lavaplayer-1.3.38.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218) ~[lavaplayer-1.3.38.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:834) ~[na:na]
Caused by: java.lang.IllegalStateException: Response code from channel info is 401
        ... 10 common frames omitted

My question is if LavaPlayer will be updated to support the new Twitch API?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
favnacommented, May 12, 2020

@duncte123 Yes this still happens, even on 1.3.48. I just made a build of Frederik’s Lavalink using that version and tried it and I got the same error log. Collapsed below is the log, including stacktrace.

Click me to expand and see stacktrace
lavalink    | 2020-05-12 19:14:58.410  INFO 1 --- [           main] lavalink.server.Launcher                 :
lavalink    |
lavalink    |        .   _                  _ _       _    __ _ _
lavalink    |       /\\ | | __ ___   ____ _| (_)_ __ | | __\ \ \ \
lavalink    |      ( ( )| |/ _` \ \ / / _` | | | '_ \| |/ / \ \ \ \
lavalink    |       \\/ | | (_| |\ V / (_| | | | | | |   <   ) ) ) )
lavalink    |        '  |_|\__,_| \_/ \__,_|_|_|_| |_|_|\_\ / / / /
lavalink    |     =========================================/_/_/_/
lavalink    |
lavalink    |   Version:        daa578a344ad6082ec96bf94847bc79787f2f595-SNAPSHOT
lavalink    |   Build:          Unofficial
lavalink    |   Build time:     12.05.2020 19:05:32 UTC
lavalink    |   Branch          master
lavalink    |   Commit:         daa578a
lavalink    |   Commit time:    12.05.2020 19:00:41 UTC
lavalink    |   JVM:            13.0.2
lavalink    |   Lavaplayer      1.3.48
lavalink    |
lavalink    | 2020-05-12 19:14:58.484  INFO 1 --- [           main] o.s.boot.SpringApplication               :
lavalink    |   .   ____          _            __ _ _
lavalink    |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
lavalink    | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
lavalink    |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
lavalink    |   '  |____| .__|_| |_|_| |_\__, | / / / /
lavalink    |  =========|_|==============|___/=/_/_/_/
lavalink    |  :: Spring Boot ::        (v2.1.8.RELEASE)
lavalink    |
lavalink    |
lavalink    | 2020-05-12 19:14:58.597  INFO 1 --- [           main] lavalink.server.Launcher                 : Starting Launcher on 55d479e4e653 with PID 1 (/opt/Lavalink/Lavalink.jar started by root in /opt/Lavalink)
lavalink    | 2020-05-12 19:14:58.598  INFO 1 --- [           main] lavalink.server.Launcher                 : No active profile set, falling back to default profiles: default
lavalink    | 2020-05-12 19:14:58.655  WARN 1 --- [kground-preinit] o.s.h.c.j.Jackson2ObjectMapperBuilder    : For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath
lavalink    | 2020-05-12 19:15:00.080  WARN 1 --- [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
lavalink    | 2020-05-12 19:15:00.100  INFO 1 --- [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext
lavalink    | 2020-05-12 19:15:00.100  INFO 1 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1441 ms
lavalink    | 2020-05-12 19:15:00.360  WARN 1 --- [           main] l.server.config.SentryConfiguration      : Turning off sentry
lavalink    | 2020-05-12 19:15:00.364  INFO 1 --- [           main] l.s.c.AudioSendFactoryConfiguration      : OS: Linux, Arch: amd64
lavalink    | 2020-05-12 19:15:00.365  INFO 1 --- [           main] l.s.c.AudioSendFactoryConfiguration      : JDA-NAS supported system detected. Enabled native audio sending.
lavalink    | 2020-05-12 19:15:00.365  INFO 1 --- [           main] l.s.c.AudioSendFactoryConfiguration      : Setting buffer to 400ms
lavalink    | 2020-05-12 19:15:00.365  INFO 1 --- [           main] l.s.c.AudioSendFactoryConfiguration      : Setting playlist load limit to 25
lavalink    | 2020-05-12 19:15:00.699  INFO 1 --- [           main] c.s.d.l.tools.GarbageCollectionMonitor   : GC monitoring enabled, reporting results every 2 minutes.
lavalink    | 2020-05-12 19:15:01.327  INFO 1 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
lavalink    | 2020-05-12 19:15:01.686  INFO 1 --- [           main] org.xnio                                 : XNIO version 3.3.8.Final
lavalink    | 2020-05-12 19:15:01.694  INFO 1 --- [           main] org.xnio.nio                             : XNIO NIO Implementation Version 3.3.8.Final
lavalink    | WARNING: An illegal reflective access operation has occurred
lavalink    | WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (jar:file:/opt/Lavalink/Lavalink.jar!/BOOT-INF/lib/xnio-nio-3.3.8.Final.jar!/) to constructor sun.nio.ch.EPollSelectorProvider()
lavalink    | WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
lavalink    | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
lavalink    | WARNING: All illegal access operations will be denied in a future release
lavalink    | 2020-05-12 19:15:01.753  INFO 1 --- [           main] o.s.b.w.e.u.UndertowServletWebServer     : Undertow started on port(s) 2333 (http) with context path ''
lavalink    | 2020-05-12 19:15:01.756  INFO 1 --- [           main] lavalink.server.Launcher                 : Started Launcher in 3.845 seconds (JVM running for 4.6)
lavalink    | 2020-05-12 19:15:26.618  INFO 1 --- [  XNIO-1 task-1] io.undertow.servlet                      : Initializing Spring DispatcherServlet 'dispatcherServlet'
lavalink    | 2020-05-12 19:15:26.618  INFO 1 --- [  XNIO-1 task-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
lavalink    | 2020-05-12 19:15:26.625  INFO 1 --- [  XNIO-1 task-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 7 ms
lavalink    | 2020-05-12 19:15:26.644  INFO 1 --- [  XNIO-1 task-1] l.server.io.HandshakeInterceptorImpl     : Incoming connection from /172.18.0.1:47682
lavalink    | 2020-05-12 19:15:26.784  INFO 1 --- [  XNIO-1 task-1] lavalink.server.io.SocketServer          : Connection successfully established from /172.18.0.1:47682
lavalink    | 2020-05-12 19:15:26.832  INFO 1 --- [   XNIO-1 I/O-3] lavalink.server.io.SocketServer          : {"op":"configureResuming","key":"0.pyk2e7z5pvd","timeout":60}
lavalink    | 2020-05-12 19:15:48.682  INFO 1 --- [  XNIO-1 task-2] l.server.player.AudioLoaderRestHandler   : GET /loadtracks
lavalink    | 2020-05-12 19:15:49.362  WARN 1 --- [ader-2-thread-1] c.s.d.l.p.DefaultAudioPlayerManager      : Suspicious exception for loading item https://www.twitch.tv/beatportofficial
lavalink    |
lavalink    | com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Server responded with an error.
lavalink    |   at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.fetchResponseAsJson(HttpClientTools.java:222) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.fetchStreamChannelInfo(TwitchStreamAudioSourceManager.java:178) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.loadItem(TwitchStreamAudioSourceManager.java:76) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager$$Lambda$554/00000000CC05F4F0.call(Unknown Source) ~[na:na]
lavalink    |   at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
lavalink    |   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
lavalink    |   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
lavalink    |   at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
lavalink    | Caused by: java.lang.IllegalStateException: Response code from channel info is 401
lavalink    |   ... 11 common frames omitted
lavalink    |
lavalink    | 2020-05-12 19:15:49.363 ERROR 1 --- [ader-2-thread-1] lavalink.server.player.AudioLoader       : Load failed
lavalink    |
lavalink    | com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Server responded with an error.
lavalink    |   at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.fetchResponseAsJson(HttpClientTools.java:222) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.fetchStreamChannelInfo(TwitchStreamAudioSourceManager.java:178) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.loadItem(TwitchStreamAudioSourceManager.java:76) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:437) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:419) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:218) ~[lavaplayer-1.3.48.jar!/:na]
lavalink    |   at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager$$Lambda$554/00000000CC05F4F0.call(Unknown Source) ~[na:na]
lavalink    |   at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
lavalink    |   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
lavalink    |   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
lavalink    |   at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
lavalink    | Caused by: java.lang.IllegalStateException: Response code from channel info is 401
lavalink    |   ... 11 common frames omitted
lavalink    |
lavalink    | 2020-05-12 19:15:49.382  INFO 1 --- [  XNIO-1 task-4] l.server.player.AudioLoaderRestHandler   : GET /loadtracks
lavalink    | 2020-05-12 19:15:49.385  INFO 1 --- [ader-2-thread-1] c.s.d.l.s.s.SoundCloudClientIdTracker    : Updating SoundCloud client ID (current is null).
lavalink    | 2020-05-12 19:15:49.751  INFO 1 --- [ader-2-thread-1] c.s.d.l.s.s.SoundCloudClientIdTracker    : Updating SoundCloud client ID succeeded, new ID is ERFnVeR1vWxLba9AtHkJEZr5qxrccMoO.
lavalink    | 2020-05-12 19:15:50.136  INFO 1 --- [ader-2-thread-1] lavalink.server.player.AudioLoader       : Loaded playlist Search results for: https://www.twitch.tv/beatportofficial

Or through hastebin, looks like GitHub wraps some lines so this might be easier to read: https://hasteb.in/tiyipeji

0reactions
favnacommented, May 22, 2020

@drozycki Confirmed. This issue can be closed I think.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: No response from Twitch - API
Hello everyone! I'm new to programming and twitch. API. So, I have a simple file and code which is the temple to log...
Read more >
com.sedmelluq.discord.lavaplayer.tools.JsonBrowser.parse ...
How to use. parse. method. in. com.sedmelluq.discord.lavaplayer.tools.JsonBrowser. Best Java code snippets using com.
Read more >
LavaPlayer: Audio Player Library for Discord Written in Java ...
LavaPlayer is an audio player library written in Java which can load audio tracks from various sources and convert them into a stream...
Read more >
DV8FromTheWorld / JDA Download - JitPack
Java wrapper for the popular chat & VOIP service: Discord https://discord.com ... JDA strives to provide a clean and full wrapping of the...
Read more >
Redbot 3.3.12 (2020-08-18) — Red
Twitch playback and YouTube searching should be functioning again. Core Bot¶. Fixed delayed help when [p]set deletedelay is enabled ( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found