lavalink-devs / lavalink Goto Github PK
View Code? Open in Web Editor NEWStandalone audio sending node based on Lavaplayer.
Home Page: https://lavalink.dev/
License: MIT License
Standalone audio sending node based on Lavaplayer.
Home Page: https://lavalink.dev/
License: MIT License
A server I'm in (that serves as a radio server) has 9 bots; all playing different streams, all playing from the same Lavalink server. There's one bot in particular though that drops its stream entirely usually immediately or after a while, but doesn't seem to be receiving any events or emitting any events (log level is set to debug and the client's websocket isn't logging any Received Event
messages). The link to the stream that's causing issues: https://www.youtube.com/watch?v=ueupsBPNkSc
When I go to play a track I get this error, I was able to find the missing library, but I need to figure out where to put it, since I'm using eris-lavalink as my client.
Can't play music from youtube.
https://pastebin.com/raw/ZE4BXW36
When I try to /loadtracks or just find tracks with lavalink.py for the first time it loads just fine:
Log of the first request:
[2018-03-03 16:35:01,783] [ INFO ] [http-nio-0.0.0.0-8822-exec-4] l.s.player.AudioLoaderRestHandler: GET /loadtracks
[2018-03-03 16:35:01,786] [ INFO ] [lava-daemon-pool-info-loader-2-thread-1] lavalink.server.player.AudioLoader: Loaded track ILLUMINATI CONFIRMED - MLG Sound Effects
But for the second time I just get a timeout in lavalink.py and in postman just says Loading...
forever.
Log of the second request (it's the same as the first):
[2018-03-03 16:36:14,148] [ INFO ] [http-nio-0.0.0.0-8822-exec-6] l.s.player.AudioLoaderRestHandler: GET /loadtracks
[2018-03-03 16:36:14,150] [ INFO ] [lava-daemon-pool-info-loader-2-thread-1] lavalink.server.player.AudioLoader: Loaded track ILLUMINATI CONFIRMED - MLG Sound Effects
This would be a very helpful feature as it removes the need to use the youtube api to grab the thumbnail url and the author id as all the other info, like the title and uri, are already returned with the lavalink ytsearch feature.
I'm getting this error on the LavaLink log when adding a track trought IPlayer#playTrack
[13:17:00] [ INFO ] [SocketServer] {"op":"play","startTime":0,"track":"QAAAlQIAHlZhdGUgTWMgLSBSdW1vIChwcm9kLiBUw7N4aWNvKQANTWFsQW1hZG9zUHJvZAAAAAAAA7U4AAtmUnJWYm5ZblIyZwABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWZSclZiblluUjJnABdzcG90aWZ5X3BsYXlsaXN0X2ltcG9ydAAAAAAAAAAA","guildId":"219254781384851467","pause":false}
[13:17:00] [ ERROR] [SocketServer] Caught exception in websocket
java.lang.NullPointerException: null
at lavalink.server.io.SocketServer.onMessage(SocketServer.java:158)
at org.java_websocket.server.WebSocketServer.onWebsocketMessage(WebSocketServer.java:524)
at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:417)
at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:170)
at org.java_websocket.server.WebSocketServer$WebSocketWorker.run(WebSocketServer.java:781)
during development of our new lib / bot we have been having issues with lava player NPE causing a stack and for LavaLink to exit which causes all connections to the player to close etc
the issue seams to be when a shard restarts and reconnects to discord (and to lava) which will eventually timeout lavalink's connection to discord due to no resume support which is fine.
the expected behaviour would be on a socket close to have the error be handled so other connections dont also get destroyed (i dont think a lavalink instance per shard is desired), im most likely hitting this issue more than anyone else due to the rate we are restarting shards and bots.
NPE below:
java.lang.NullPointerException: null
at lavalink.server.io.SocketServer.close(SocketServer.java:130)
at lavalink.server.io.SocketServer.onClose(SocketServer.java:122)
at org.java_websocket.server.WebSocketServer.onWebsocketClose(WebSocketServer.java:595)
at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:504)
at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:515)
at org.java_websocket.WebSocketImpl.eot(WebSocketImpl.java:563)
at org.java_websocket.SocketChannelIOHelper.read(SocketChannelIOHelper.java:42)
at org.java_websocket.server.WebSocketServer.run(WebSocketServer.java:406)
at java.lang.Thread.run(Thread.java:834)
if there is anything else i can provide please let me know
Default config ~ discord.js-lavalink
2018-11-09 13:58:57.036 ERROR 18038 --- [pool-2-thread-1] oshi.util.ParseUtil : Number is too big for a long parsing string '18038 (java) S 1012 18038 1012 34817 18038 4202496 105074 996 4 1 1804 66 0 0 20 0 36 0 652454 5971169280 92864 18446744073709551615 4194304 4197664 140727357843456 140727357826128 140379713085335 0 0 0 16800975 18446744073709551615 0 0 17 3 0 0 0 0 0 0 0 0 0 0 18038 7164 7164 7164' to long array
how would i go on about playing a local file?
Original issue: https://github.com/Frederikam/FredBoat/issues/403
Tested this with latest LL and FB code, resumes are not handled optimally.
The bot always leaves the voicechat, music is paused, unpaused on rejoin.
Sometimes it does not rejoin, and therefore does not continue the playback.Reconnects break it worse: Never rejoins the voicechat, but always keeps playing.
Instead, these events should be handled the same way they are handled when running without LL:
Resumes are, if at all, noticed by a short audio cut out.
On Reconnects the VoiceChannel is left, and upon restoration of the connection, rejoined and the playback continued.
Perhaps a few fields (such as the ones below) could be included in the response?
Field | Type | Description |
---|---|---|
isSearchResult | boolean | Whether or not the results are from a search |
provider | string | Which provider returned the tracks (e.g. YouTube, Vimeo etc) |
isPlaylist | boolean | Whether or not the results are from a playlist |
Hi, tried it from two computers and two different networks but Team City never logs in. I was able to get into it fine last time I used it.
No error code, just spins on the login button for eternity.
The continued split between v2 and v3 branches keeps causing unnecessary work (see merging of #125), as well as confusion in the chat when talking about where an issue is happening.
I propose a faster moving versioning on the main branch. There is no good reason except vanity (imho) to keep holding off the merge of v3 into the main development branch. We have already discussed how the breaking change prompting the v3 bump could have been avoided (instead of changing the endpoint, adding a new one would have been a backwards compatible possibility), so we can all agree that a major version bump should not be happening in the reasonably forseeable future.
There are two more annoyances related to versioning:
Github tags would be super helpful. Many times ppl get confused by the CI server and use builds from outdated, or non-supported branches. However, due to the LavalinkClient residing in the same repo as the LavalinkServer, we can't version them individually by tags. They don't even use any shared code, so moving the client into it's own repo would be the sane decision.
Here are the proposed milestones for the current features in development / things required to make it work:
2.2:
3.0:
Rough roadmap for post 3.0:
3.1, or general 3.x minors, depending on how development goes:
Majors:
Using the /loadtracks
endpoint returns lavaplayer encoded tracks that are almost always decoded immedietly after using the /decodetrack
endpoint to get track info. When used with a playlist of hundreds of songs or a search result this can lead to hundreds of calls to the decode endpoint.
/loadtracks
endpoint.GET /loadtracks?identifier=dQw4w9WgXcQ&info=true
{
"tracks": [
{
"track": "AAAA==",
"info": {
"title": "48 hours of screaming",
...
}
}
]
}
Advantage: No additional requests have to be made to load tracks and view track info.
Disadvantage: Modifies the existing response format which could make existing clients incompatible with the endpoint.
/decodetrack
endpoint.GET /decodetrack?tracks=AAAA==,BBBB==,CCCC==,...
[
{
"track": "AAAA==",
"info": {
"title": "48 hours of screaming",
...
}
},
...
]
Advantage: The endpoint was added yesterday so it is unlikely that changing the response format would lead to incompatible clients.
Disadvantages:
When using the REST API endpoint /loadtracks and it fails due to copyright block, the response given back is the following
{
"playlistInfo": {},
"loadType": "LOAD_FAILED",
"tracks": []
}
is it possible to also have the reason why the track failed to load? For example "This video contains content from whomever, who has blocked it in your country on copyright grounds."
Link#getCurrentSocket() may return null resulting in this NPE in the VoiceServerUpdateInterceptor:
java.lang.NullPointerException: null
at lavalink.client.io.VoiceServerUpdateInterceptor.handleInternally(VoiceServerUpdateInterceptor.java:63)
at net.dv8tion.jda.core.handle.SocketHandler.handle(SocketHandler.java:37)
at net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:1001)
at net.dv8tion.jda.core.requests.WebSocketClient.onTextMessage(WebSocketClient.java:684)
at net.dv8tion.jda.core.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:1052)
at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:368)
at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:270)
at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:990)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:749)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
IMPLEMENTATION.md does not document the destroy
OP as used in https://github.com/Frederikam/Lavalink/blob/f95d7f3e9f10ad343efe5c58a50ce3bb6f4ea170/LavalinkClient/src/main/java/lavalink/client/io/Link.java#L178
When loading an OPUS stream in this case, http://janus.cdnstream.com:5397/autodj - with the new Lavalink Dev branch update (with the new Lavaplayer version 1.2.63 that gets Ogg/Opus metadata as well as icy*- metadata from streams such as this one), the following error occurs using FredBoat (so the Java LavalinkClient):
https://hastebin.com/wiqapotogi.log https://sentry.io/share/issue/6be7059e02494827b2c05f243a288bb7/
[2018-04-14 00:44:16,129] [ INFO ] [WebSocketWorker-18] lavalink.server.io.SocketServer: {"volume":100,"op":"play","startTime":0,"track":"QAAAhQIAA0VDRAAQRUMgRGlzY29yZCBSYWRpb3//////////ACZodHRwOi8vamFudXMuY2Ruc3RyZWFtLmNvbTo1Mzk3L2F1dG9kagEBACZodHRwOi8vamFudXMuY2Ruc3RyZWFtLmNvbTo1Mzk3L2F1dG9kagAEaHR0cAADb2dnAAAAAAAAAAA=","guildId":"249664293656592384","pause":false}
Now using Lavaplayer 1.2.63 directly doesn't have any issues on another implementation -- and using a different (here just JS) Lavalink client implementation it works fine except/until sending a volume
update (for this client implementation) that is not unity/100 causes the stream to end with the same decoding error:
[01:12:56] [ INFO ] [SocketServer] {"op":"play","guildId":"249664293656592384","track":"QAAAhQIAA0VDRAAQRUMgRGlzY29yZCBSYWRpb3//////////ACZodHRwOi8vamFudXMuY2Ruc3RyZWFtLmNvbTo1Mzk3L2F1dG9kagEBACZodHRwOi8vamFudXMuY2Ruc3RyZWFtLmNvbTo1Mzk3L2F1dG9kagAEaHR0cAADb2dnAAAAAAAAAAA="}
[01:14:01] [ INFO ] [SocketServer] {"op":"volume","guildId":"249664293656592384","volume":1}
[01:14:02] [ ERROR] [LocalAudioTrackExecutor] Error in playback of http://janus.cdnstream.com:5397/autodj
com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Something went wrong when decoding the track.
at com.sedmelluq.discord.lavaplayer.tools.ExceptionTools.wrapUnfriendlyExceptions(ExceptionTools.java:40)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:260)
at com.sedmelluq.discord.lavaplayer.container.ogg.OggAudioTrack.process(OggAudioTrack.java:40)
at com.sedmelluq.discord.lavaplayer.track.DelegatedAudioTrack.processDelegate(DelegatedAudioTrack.java:27)
at com.sedmelluq.discord.lavaplayer.source.http.HttpAudioTrack.process(HttpAudioTrack.java:51)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.execute(LocalAudioTrackExecutor.java:90)
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$executeTrack$1(DefaultAudioPlayerManager.java:357)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.IllegalStateException: Encoding failed with error -1
at com.sedmelluq.discord.lavaplayer.natives.opus.OpusEncoder.encode(OpusEncoder.java:47)
at com.sedmelluq.discord.lavaplayer.format.transcoder.OpusChunkEncoder.encode(OpusChunkEncoder.java:30)
at com.sedmelluq.discord.lavaplayer.filter.volume.AudioFrameVolumeChanger.rebuild(AudioFrameVolumeChanger.java:61)
at com.sedmelluq.discord.lavaplayer.track.playback.AudioFrameBuffer.rebuild(AudioFrameBuffer.java:215)
at com.sedmelluq.discord.lavaplayer.filter.volume.AudioFrameVolumeChanger.apply(AudioFrameVolumeChanger.java:105)
at com.sedmelluq.discord.lavaplayer.container.common.OpusPacketRouter.checkDecoderNecessity(OpusPacketRouter.java:170)
at com.sedmelluq.discord.lavaplayer.container.common.OpusPacketRouter.process(OpusPacketRouter.java:85)
at com.sedmelluq.discord.lavaplayer.container.ogg.OggOpusTrackProvider.provideFrames(OggOpusTrackProvider.java:90)
at com.sedmelluq.discord.lavaplayer.container.ogg.OggAudioTrack.processTrackLoop(OggAudioTrack.java:59)
at com.sedmelluq.discord.lavaplayer.container.ogg.OggAudioTrack.lambda$process$0(OggAudioTrack.java:42)
at com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor.executeProcessingLoop(LocalAudioTrackExecutor.java:248)
... 8 common frames omitted
The stream here does work fine, except the volume
update breaks it with the same encoding error.
The reasons I can see this happening are:
startTime
and volume
with Lavalink/clientplay
op without a startTime
or volume
by default (as seen above) works fine; so it must be something to do with one of those (volume/startTime)Hello,
I've been experiencing SocketTimeouts when playing the Monster cat 24/7 stream. When I first issue the play command, the bot will play the stream normally, but anywhere from 15mins to 1hour, Lavalink will stop playing out of nowhere and the following exception will be raised: https://sentry.io/share/issue/3232313230322e333536343935383737/
This doesn't happen when playing long videos from youtube, so it seems to be an issue related to twitch.tv.
I'm running lavalink as a systemd unit service, on an ubuntu 16.04 box. Neither my machine or network are being rammed, for now this machine is only playing one song at a time.
Java information (default-jre):
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
If it matters, lavalink is running with root privileges. I am using eris-lavalink as a client.
Is this normal behavior? Am I supposed to handle this somehow?
erros.log:
[11:27:36] [lava-daemon-pool-info-loader-2-thread-1] [AudioLoader] Load failed com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Loading Twitch channel information failed. at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.fetchStreamChannelInfo(TwitchStreamAudioSourceManager.java:146) at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.loadItem(TwitchStreamAudioSourceManager.java:59) at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:429) at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:415) at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:219) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) at sun.security.ssl.InputRecord.read(InputRecord.java:503) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930) at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139) at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155) at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface.execute(HttpInterface.java:60) at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.fetchResponseAsJson(HttpClientTools.java:286) at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.fetchStreamChannelInfo(TwitchStreamAudioSourceManager.java:144) ... 8 common frames omitted [17:46:06] [lava-daemon-pool-info-loader-2-thread-1] [AudioLoader] Load failed com.sedmelluq.discord.lavaplayer.tools.FriendlyException: Loading Twitch channel information failed. at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.fetchStreamChannelInfo(TwitchStreamAudioSourceManager.java:146) at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.loadItem(TwitchStreamAudioSourceManager.java:59) at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItemOnce(DefaultAudioPlayerManager.java:429) at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.checkSourcesForItem(DefaultAudioPlayerManager.java:415) at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.lambda$createItemLoader$0(DefaultAudioPlayerManager.java:219) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) at sun.security.ssl.InputRecord.read(InputRecord.java:503) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930) at sun.security.ssl.AppInputStream.read(AppInputStream.java:105) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139) at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155) at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface.execute(HttpInterface.java:60) at com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools.fetchResponseAsJson(HttpClientTools.java:286) at com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager.fetchStreamChannelInfo(TwitchStreamAudioSourceManager.java:144) ... 8 common frames omitted
I can run tests and provide more information if needed.
When the bot is moved in the discord client from one channel to another, the LavalinkClient does not recognize that.
Probably needs a class similar to the VoiceServerUpdateInterceptor.java
hooked in to
VOICE_STATE_UPDATE
similar to this line:
https://github.com/Frederikam/Lavalink/blob/51ec2c63983f965743bf1cc26f19d7fb1b6d4f3d/LavalinkClient/src/main/java/lavalink/client/io/Lavalink.java#L179
So do I have to POST this 'event' to where Lavalink is or do I receive it from Discord?
{
"op": "voiceUpdate",
"guildId": "...",
"sessionId": "...",
"event": "..."
}
If I have to post it, where do I get event
from?
Auto create default configuration file if does not exists in lavalink directory, instead of download manually configuration and put into directory.
here is the full error
2019-01-17 01:43:02.705 ERROR 19316 --- [ XNIO-2 I/O-1] lavalink.server.io.SocketServer : Exception while handling websocket message
java.io.EOFException: null
at java.base/java.io.DataInputStream.readFully(DataInputStream.java:202) ~[na:na]
at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:614) ~[na:na]
at java.base/java.io.DataInputStream.readUTF(DataInputStream.java:569) ~[na:na]
at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager.decodeTrack(DefaultAudioPlayerManager.java:271) ~[lavaplayer-1.3.10.jar!/:na]
at lavalink.server.util.Util.toAudioTrack(Util.java:44) ~[classes!/:na]
at lavalink.server.io.WebSocketHandlers.play(WebSocketHandlers.kt:53) ~[classes!/:na]
at lavalink.server.io.SocketServer.handleTextMessageSafe(SocketServer.kt:149) ~[classes!/:na]
at lavalink.server.io.SocketServer.handleTextMessage(SocketServer.kt:129) ~[classes!/:na]
at org.springframework.web.socket.handler.AbstractWebSocketHandler.handleMessage(AbstractWebSocketHandler.java:43) ~[spring-websocket-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.web.socket.handler.WebSocketHandlerDecorator.handleMessage(WebSocketHandlerDecorator.java:75) ~[spring-websocket-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator.handleMessage(LoggingWebSocketHandlerDecorator.java:56) ~[spring-websocket-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator.handleMessage(ExceptionWebSocketHandlerDecorator.java:58) ~[spring-websocket-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter.handleTextMessage(StandardWebSocketHandlerAdapter.java:113) ~[spring-websocket-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter.access$000(StandardWebSocketHandlerAdapter.java:42) ~[spring-websocket-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter$3.onMessage(StandardWebSocketHandlerAdapter.java:84) ~[spring-websocket-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter$3.onMessage(StandardWebSocketHandlerAdapter.java:81) ~[spring-websocket-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
at io.undertow.websockets.jsr.FrameHandler$7.run(FrameHandler.java:286) ~[undertow-websockets-jsr-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.websockets.jsr.ServerWebSocketContainer$1.call(ServerWebSocketContainer.java:168) ~[undertow-websockets-jsr-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.websockets.jsr.ServerWebSocketContainer$1.call(ServerWebSocketContainer.java:165) ~[undertow-websockets-jsr-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) ~[undertow-servlet-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.websockets.jsr.ServerWebSocketContainer.invokeEndpointMethod(ServerWebSocketContainer.java:602) ~[undertow-websockets-jsr-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.websockets.jsr.ServerWebSocketContainer.invokeEndpointMethod(ServerWebSocketContainer.java:592) ~[undertow-websockets-jsr-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.websockets.jsr.FrameHandler.invokeTextHandler(FrameHandler.java:266) ~[undertow-websockets-jsr-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.websockets.jsr.FrameHandler.onFullTextMessage(FrameHandler.java:317) ~[undertow-websockets-jsr-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.websockets.core.AbstractReceiveListener$2.complete(AbstractReceiveListener.java:156) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at io.undertow.websockets.core.AbstractReceiveListener$2.complete(AbstractReceiveListener.java:152) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at io.undertow.websockets.core.BufferedTextMessage.read(BufferedTextMessage.java:105) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at io.undertow.websockets.core.AbstractReceiveListener.readBufferedText(AbstractReceiveListener.java:152) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at io.undertow.websockets.core.AbstractReceiveListener.bufferFullMessage(AbstractReceiveListener.java:90) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at io.undertow.websockets.jsr.FrameHandler.onText(FrameHandler.java:182) ~[undertow-websockets-jsr-1.4.25.Final.jar!/:1.4.25.Final]
at io.undertow.websockets.core.AbstractReceiveListener.handleEvent(AbstractReceiveListener.java:44) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at io.undertow.websockets.core.AbstractReceiveListener.handleEvent(AbstractReceiveListener.java:33) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) ~[xnio-api-3.3.8.Final.jar!/:3.3.8.Final]
at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:948) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:929) ~[undertow-core-2.0.14.Final.jar!/:2.0.14.Final]
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) ~[xnio-api-3.3.8.Final.jar!/:3.3.8.Final]
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) ~[xnio-api-3.3.8.Final.jar!/:3.3.8.Final]
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88) ~[xnio-nio-3.3.8.Final.jar!/:3.3.8.Final]
at org.xnio.nio.WorkerThread.run(WorkerThread.java:561) ~[xnio-nio-3.3.8.Final.jar!/:3.3.8.Final]
Running default config.
2018-11-01 14:38:06.741 ERROR 16780 --- [pool-2-thread-1] lavalink.server.io.StatsTask : Exception while sending stats
org.json.JSONException: JSON does not allow non-finite numbers.
at org.json.JSONObject.testValidity(JSONObject.java:2214) ~[json-20180813.jar!/:na]
at org.json.JSONObject.put(JSONObject.java:1813) ~[json-20180813.jar!/:na]
at org.json.JSONObject.put(JSONObject.java:1720) ~[json-20180813.jar!/:na]
at lavalink.server.io.StatsTask.sendStats(StatsTask.java:93) ~[classes!/:na]
at lavalink.server.io.StatsTask.run(StatsTask.java:56) ~[classes!/:na]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source) [na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:na]
at java.base/java.lang.Thread.run(Unknown Source) [na:na]
Sometimes lavalink will fail to connect to voice channels. Not sure if it's an issue with the lavalink server or with eris-lavalink. Sometimes it will also fail to disconnect from the voice channel, and it won't be able to connect again unless the connected client is restarted or the bot is "voice kicked" from the channel.
Link to related issue: briantanner/eris-lavalink#4
Lavalink v2 will be addressing issues about the robustness of Lavalink. By moving several actions to REST we can more easily assure that actions have occurred successfully, like playing a track or joining a voice channel.
RestAction
systemThese changes aren't final and discussion is encouraged.
Links to YouTube Mix playlists only appear to return the video linked to the watch?v=
parameter rather than the videos from the list
parameter
Example URL: https://www.youtube.com/watch?v=v7Srbp8WPMY&list=RDv7Srbp8WPMY
When testing LavaLink on new systems it would be nice to have a config option to disable native audio sending, since the internal checks do not account for new kernels/systems.
LavaLink seems to default NAS to enabled, making it impossible to test the resources on (currently) unsupported systems like linux-aarch64.
When I attempt to run Lavalink using Java 9, I get the following:
P:\Mateusz\Developer\Discord\Lavalink>java -jar Lavalink.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: lavalink/server/Launcher has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 53.0
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
at java.base/java.net.URLClassLoader.defineClass(Unknown Source)
at java.base/java.net.URLClassLoader.access$100(Unknown Source)
at java.base/java.net.URLClassLoader$1.run(Unknown Source)
at java.base/java.net.URLClassLoader$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:46)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Here's my Java version:
P:\Mateusz\Developer\Discord\Lavalink>java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
Presumably this means that my Java version (9) is older than required (presumably 10).
Considering that large number of servers running Lavalink will not have anything above Java 8 (since a lot of stuff is based on Debian stable or oldstable, and these go up to Java 8, maybe 9 only), this effectively renders Lavalink 3 useless on most server machines.
While I admit I'm an idiot for not realizing the issue sooner, I spent the better part of 12 hours figuring out why lavalink would silently exit with NO logs at all.
Turns out my application.yaml was causing the problem. After deleting it, lavalink worked fine. Would be super nice for future people if some error was thrown for them to see.
Current functionality: https://i.imgur.com/mbtPrYT.png
I'm getting a java fatal error when running lavalink's latest version, the log is on pastebin, here.
It appears that the jars compiled by Javac 9 on TeamCity have faulty compatibility with Java 8. A solution could be to use a different version of the JDK on TC.
java.lang.ClassNotFoundException: com.sedmelluq.discord.lavaplayer.jdaudp.NativeAudioSendFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Temporary workarounds:
./gradlew build
This issue is only relevant to people using the JDA client.
Here at FredBoat we are working on separating most of our business logic (mostly commands) from JDA into two different services. The problem with this is that Lavalink-Client is tightly coupled to JDA. I see two solutions to this problem:
Solution 2 is clearly the easiest solution. The way I see myself doing it would be to make the Lavalink
and maybe Link
abstract. This would cause breaking changes, but hopefully rather few.
By making Lavalink generic, users will likely also be able to use discord4j and javacord. Feedback is welcome.
When using a SoundCloud track ID as the identifier, the REST API returns nothing. Is this normal? Am I missing the proper identifier? (I checked by /decodetrack
as well which returned the identifier - is that the only way to get SoundCloud info?) - I apologize if I'm missing something obvious! YouTube works fine.
It'd be incredibly amazing if our clients could change the EQ settings during the playback or if it'd support the lavaplayer filters.
this is the biggest thing lavalink misses imo so far, and has already inspired the creation of 2 different audio node servers that do notify clients of successful updates.
what i mean by this is, let's say you set the volume to 200. how do you know it worked? what if you got an error? you can't (easily) and there's no (good) workaround to knowing something succeeded or errorred. i hope lavalink will get this functionality one day as it's pretty annoying having to just rely and hope that everything went right. what if i want to know that i updated the volume? what if i want to know what bands changed and to what values? what if i want to see if lavalink errored? all of this information can be pretty helpful to bot developers and i think it's worth adding.
so far, there's no way to be certain of volume updates, pausing/resuming or tracks starting, and while the reason given for that is that they're all client side, the point i'm trying to make is that the clients depend on the server for all their functionality and can't be sure of the vast majority of that, and in the rare-ish chance that an error does happen, clients don't know of that.
Yes I am only using V1 because the d.js client is not updated. But whenever I play ANY song it just errors and does this: https://vic.tion.exposed/uPRdi.png and then emits the end event
I see in the Eris client example they designated regions. Is it possible to 'assign' a lavalink node to a region? If so what is the config style like for that?
Thanks!
I got this issue upon disconnecting the websocket while a player was playing.
https://i.serux.pro/2b0931ec13.png
Youtube can make temporary playlists called mixes for the user. The difference between these and normal playlists is that the video's aren't numbered and once all 50 are watched another 50 get added (plus they exist temporary). For the Youtube API these should behave just like a normal playlist. But for some reason I had Lavalinks REST API take 20 seconds to perform a request to a Youtube mix.
These are response times I collected with Postman:
https://sharex.reinfernhout.xyz/i/20ufF.png
When testing with the Youtube API I found no longer response times for Youtube mixes myself.
The IMPLEMENTATION.md doesn't mention that it's an optional field, and the LavalinkClient errors out on it because it expects it.
I see two options:
If so can I please have a link to download it, thanks.
I personally find the debug endpoint really useful, so I would happily use it for some stuff that the stats endpoint won't send to me (like the lavalink server version), however it's not really a wise idea to have this endpoint open for "public" lavalink instances, where not just one, but many owners share the same server. I don't want them to break any internal or execute remote code on the server. So a config boolean definition would be awesome to have.
PS: are there any plans on multiple passwords?
Default config*
2018-11-09 12:12:34.259 ERROR 1061 --- [ool-13-thread-1] oshi.util.ParseUtil : Number is too big for a long parsing string '1061 (java) S 1012 1061 1012 34817 1061 4202496 150030 10684 105 2 5748 295 2 6 20 0 195 0 1275 6169038848 132393 18446744073709551615 4194304 4197664 140720428812160 140720428794832 139998015491991 0 0 0 16800975 18446744073709551615 0 0 17 1 0 0 0 0 0 0 0 0 0 0 1061 7164 7164 7164' to long array
2018-11-09 12:12:34.267 ERROR 1061 --- [ool-13-thread-1] lavalink.server.io.StatsTask : Exception while sending stats
org.json.JSONException: JSON does not allow non-finite numbers.
at org.json.JSONObject.testValidity(JSONObject.java:2214) ~[json-20180813.jar!/:na]
at org.json.JSONObject.put(JSONObject.java:1813) ~[json-20180813.jar!/:na]
at org.json.JSONObject.put(JSONObject.java:1720) ~[json-20180813.jar!/:na]
at lavalink.server.io.StatsTask.sendStats(StatsTask.java:93) ~[classes!/:na]
at lavalink.server.io.StatsTask.run(StatsTask.java:56) ~[classes!/:na]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[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]
Hey looks like Twitch changed something and now support for it is broken in Lavalink anyone know why?
Version 2.1 and also tried 2.2 no luck
LavaLink https://i.imgur.com/IiGjEIa.png
Bot 1 https://i.imgur.com/4QhQA8w.png
Bot 2 https://i.imgur.com/QZwZX9k.png
So it would appear that the current limit is lavaplayer's default (600) tracks. From what I've seen, there's no property to change this.
Perhaps a property that can be changed in application.yml
to set the maximum amount of tracks loaded from a playlist?
As per docs:
This would be a very useful feature, if not for the fact that most WS libraries do not expose the handshake, and thus provide no ability to recover that header. While at present it's possible to distinguish Lavalink 3.x and 2.x by checking REST response type (array vs object), this is a fragile approach that might not work in the future.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.