angelobreuer / Lavalink4NET

Lavalink4NET is a Lavalink wrapper with node clustering, caching and custom players for .NET with support for Discord.Net, DSharpPlus, Remora, and NetCord.
https://lavalink4net.angelobreuer.de/
MIT License
154 stars 27 forks source link

Missing implementation/definition of the `TrackStart` event #32

Closed NenoxAG closed 4 years ago

NenoxAG commented 4 years ago

Is your feature request related to a problem? Please describe. I won't be able to get my bot to run with a cluster of Lavalink Nodes. There always is an error in the Lavalink console. With a single Lavalink node everything works as expected.

Describe the solution you'd like A better wiki entry that deals more with the cluster, how to use a cluster and how to start players from a cluser, ...

Additional context Log of Lavalink:

2020-04-10 12:46:37.615  INFO 26841 --- [  XNIO-1 task-6] l.server.player.AudioLoaderRestHandler   : GET /loadtracks
2020-04-10 12:46:37.834  INFO 26841 --- [   XNIO-1 I/O-1] lavalink.server.io.SocketServer          : {"op":"voiceUpdate","guildId":"`xxx`","sessionId":"xxx","event":{"token":"xxx","guild_id":xxx,"endpoint":"eu-central922.discord.media:80"}}
2020-04-10 12:46:38.549  INFO 26841 --- [ader-2-thread-1] lavalink.server.player.AudioLoader       : Loaded track Unlike Pluto - Everything Black (feat. Mike Taylor)
2020-04-10 12:46:38.592  INFO 26841 --- [   XNIO-1 I/O-1] lavalink.server.io.SocketServer          : {"op":"play","guildId":"xxx","track":"QAAAlQIAM1VubGlrZSBQbHV0byAtIEV2ZXJ5dGhpbmcgQmxhY2sgKGZlYXQuIE1pa2UgVGF5bG9yKQAIQ2xvdWRLaWQAAAAAAAN+iAALQTZQbGU0YUpSeUEAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1BNlBsZTRhSlJ5QQAHeW91dHViZQAAAAAAAAAA","startTime":0,"noReplace":false}
2020-04-10 12:46:38.605  INFO 26841 --- [   XNIO-1 I/O-1] lavalink.server.io.SocketServer          : Connection closed from /127.0.0.1:58946 -- CloseStatus[code=1007, reason=]
2020-04-10 12:46:38.606  INFO 26841 --- [   XNIO-1 I/O-1] lavalink.server.io.SocketContext         : Shutting down 1 playing players.
2020-04-10 12:46:38.609 ERROR 26841 --- [     parallel-1] lavalink.server.io.SocketContext         : Error

java.io.IOException: UT002002: Channel is closed
        at io.undertow.websockets.core.WebSocketChannel.send(WebSocketChannel.java:343) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendInternal(WebSockets.java:906) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendInternal(WebSockets.java:900) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendText(WebSockets.java:63) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendText(WebSockets.java:50) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at lavalink.server.io.SocketContext.send(SocketContext.kt:138) ~[classes!/:na]
        at lavalink.server.io.SocketContext.send(SocketContext.kt:127) ~[classes!/:na]
        at lavalink.server.io.SocketContext.handleMagmaEvent(SocketContext.kt:113) ~[classes!/:na]
        at lavalink.server.io.SocketContext.access$handleMagmaEvent(SocketContext.kt:48) ~[classes!/:na]
        at lavalink.server.io.SocketContext$1.accept(SocketContext.kt:82) ~[classes!/:na]
        at lavalink.server.io.SocketContext$1.accept(SocketContext.kt:48) ~[classes!/:na]
        at reactor.core.publisher.LambdaSubscriber.onNext(LambdaSubscriber.java:130) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxCreate$BufferAsyncSink.drain(FluxCreate.java:793) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxCreate$BufferAsyncSink.next(FluxCreate.java:718) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxCreate$SerializedSink.next(FluxCreate.java:153) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at space.npstr.magma.impl.Magma.lambda$new$2(Magma.java:100) ~[impl-0.12.5.jar!/:na]
        at space.npstr.magma.impl.AudioStackLifecyclePipeline.hookOnNext(AudioStackLifecyclePipeline.java:121) ~[impl-0.12.5.jar!/:na]
        at space.npstr.magma.impl.AudioStackLifecyclePipeline.hookOnNext(AudioStackLifecyclePipeline.java:83) ~[impl-0.12.5.jar!/:na]
        at reactor.core.publisher.BaseSubscriber.onNext(BaseSubscriber.java:158) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.runAsync(FluxPublishOn.java:398) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.run(FluxPublishOn.java:484) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[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]

2020-04-10 12:46:38.609 ERROR 26841 --- [   XNIO-1 I/O-1] lavalink.server.io.SocketContext         : Error

java.io.IOException: UT002002: Channel is closed
        at io.undertow.websockets.core.WebSocketChannel.send(WebSocketChannel.java:343) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendInternal(WebSockets.java:906) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendInternal(WebSockets.java:900) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendText(WebSockets.java:63) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendText(WebSockets.java:50) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at lavalink.server.io.SocketContext.send(SocketContext.kt:138) ~[classes!/:na]
        at lavalink.server.io.SocketContext.send(SocketContext.kt:127) ~[classes!/:na]
        at lavalink.server.player.EventEmitter.onTrackEnd(EventEmitter.java:80) ~[classes!/:na]
        at com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter.onEvent(AudioEventAdapter.java:70) ~[lavaplayer-1.3.38.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayer.dispatchEvent(DefaultAudioPlayer.java:350) ~[lavaplayer-1.3.38.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayer.stopWithReason(DefaultAudioPlayer.java:137) ~[lavaplayer-1.3.38.jar!/:na]
        at com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayer.stopTrack(DefaultAudioPlayer.java:125) ~[lavaplayer-1.3.38.jar!/:na]
        at lavalink.server.player.Player.stop(Player.java:72) ~[classes!/:na]
        at lavalink.server.io.SocketContext.shutdown$Lavalink_Server(SocketContext.kt:181) ~[classes!/:na]
        at lavalink.server.io.SocketServer.afterConnectionClosed(SocketServer.kt:122) ~[classes!/:na]
        at org.springframework.web.socket.handler.WebSocketHandlerDecorator.afterConnectionClosed(WebSocketHandlerDecorator.java:85) ~[spring-websocket-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
        at org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator.afterConnectionClosed(LoggingWebSocketHandlerDecorator.java:72) ~[spring-websocket-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
        at org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator.afterConnectionClosed(ExceptionWebSocketHandlerDecorator.java:78) ~[spring-websocket-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
        at org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter.onClose(StandardWebSocketHandlerAdapter.java:144) ~[spring-websocket-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
        at io.undertow.websockets.jsr.UndertowSession.closeInternal(UndertowSession.java:235) ~[undertow-websockets-jsr-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.jsr.FrameHandler$1.run(FrameHandler.java:107) ~[undertow-websockets-jsr-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.jsr.ServerWebSocketContainer$1.call(ServerWebSocketContainer.java:170) ~[undertow-websockets-jsr-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.jsr.ServerWebSocketContainer$1.call(ServerWebSocketContainer.java:167) ~[undertow-websockets-jsr-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) ~[undertow-servlet-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.jsr.ServerWebSocketContainer.invokeEndpointMethod(ServerWebSocketContainer.java:604) ~[undertow-websockets-jsr-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.jsr.ServerWebSocketContainer.invokeEndpointMethod(ServerWebSocketContainer.java:594) ~[undertow-websockets-jsr-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.jsr.FrameHandler.onFullCloseMessage(FrameHandler.java:100) ~[undertow-websockets-jsr-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.AbstractReceiveListener$1.complete(AbstractReceiveListener.java:136) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.AbstractReceiveListener$1.complete(AbstractReceiveListener.java:124) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.BufferedBinaryMessage.read(BufferedBinaryMessage.java:95) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.AbstractReceiveListener.readBufferedBinary(AbstractReceiveListener.java:124) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.AbstractReceiveListener.bufferFullMessage(AbstractReceiveListener.java:98) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.AbstractReceiveListener.onClose(AbstractReceiveListener.java:62) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.AbstractReceiveListener.handleEvent(AbstractReceiveListener.java:50) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.AbstractReceiveListener.handleEvent(AbstractReceiveListener.java:33) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.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:951) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameReadListener.handleEvent(AbstractFramedChannel.java:932) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.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]

2020-04-10 12:46:38.612 ERROR 26841 --- [     parallel-2] lavalink.server.io.SocketContext         : Error

java.io.IOException: UT002002: Channel is closed
        at io.undertow.websockets.core.WebSocketChannel.send(WebSocketChannel.java:343) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendInternal(WebSockets.java:906) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendInternal(WebSockets.java:900) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendText(WebSockets.java:63) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at io.undertow.websockets.core.WebSockets.sendText(WebSockets.java:50) ~[undertow-core-2.0.26.Final.jar!/:2.0.26.Final]
        at lavalink.server.io.SocketContext.send(SocketContext.kt:138) ~[classes!/:na]
        at lavalink.server.io.SocketContext.send(SocketContext.kt:127) ~[classes!/:na]
        at lavalink.server.io.SocketContext.handleMagmaEvent(SocketContext.kt:113) ~[classes!/:na]
        at lavalink.server.io.SocketContext.access$handleMagmaEvent(SocketContext.kt:48) ~[classes!/:na]
        at lavalink.server.io.SocketContext$1.accept(SocketContext.kt:82) ~[classes!/:na]
        at lavalink.server.io.SocketContext$1.accept(SocketContext.kt:48) ~[classes!/:na]
        at reactor.core.publisher.LambdaSubscriber.onNext(LambdaSubscriber.java:130) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxCreate$BufferAsyncSink.drain(FluxCreate.java:793) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxCreate$BufferAsyncSink.next(FluxCreate.java:718) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxCreate$SerializedSink.next(FluxCreate.java:153) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at space.npstr.magma.impl.Magma.lambda$new$2(Magma.java:100) ~[impl-0.12.5.jar!/:na]
        at space.npstr.magma.impl.AudioStack.handleCloseWebSocket(AudioStack.java:168) ~[impl-0.12.5.jar!/:na]
        at space.npstr.magma.impl.AudioStack.hookOnNext(AudioStack.java:120) ~[impl-0.12.5.jar!/:na]
        at space.npstr.magma.impl.AudioStack.hookOnNext(AudioStack.java:54) ~[impl-0.12.5.jar!/:na]
        at reactor.core.publisher.BaseSubscriber.onNext(BaseSubscriber.java:158) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.runAsync(FluxPublishOn.java:398) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.run(FluxPublishOn.java:484) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.2.12.RELEASE.jar!/:3.2.12.RELEASE]
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[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]
angelobreuer commented 4 years ago

Hey @NenoxAG, thanks for your report!

both LavalinkNode and LavalinkCluster implement the IAudioService interface:

https://github.com/angelobreuer/Lavalink4NET/blob/b3d4ee13d4acd756c460a8ca6cadf2daa1368e18/src/Lavalink4NET/LavalinkNode.cs#L48

https://github.com/angelobreuer/Lavalink4NET/blob/b3d4ee13d4acd756c460a8ca6cadf2daa1368e18/src/Lavalink4NET/Cluster/LavalinkCluster.cs#L45

All Wikis for the LavalinkNode apply for the LavalinkCluster.


Are you using the latest version of Lavalink4NET and Lavalink?

In your Lavalink log it seems like the Lavalink4NET client is closing the connection due to a protocol error (1007 [WebSocketCloseStatus.InvalidPayloadData]):

https://github.com/angelobreuer/Lavalink4NET/blob/b3d4ee13d4acd756c460a8ca6cadf2daa1368e18/src/Lavalink4NET/LavalinkSocket.cs#L535-L536

Can you provide the log of your Lavalink client? You can turn on logging with passing an ILogger implementation to your Cluster constructor:

https://github.com/angelobreuer/Lavalink4NET/blob/b3d4ee13d4acd756c460a8ca6cadf2daa1368e18/src/Lavalink4NET/Cluster/LavalinkCluster.cs#L73

For dummy logging you can use a simple inline logger:

var myLogger = new EventLogger();

myLogger.LogMessage += (sender, args) =>
{
    Console.WriteLine(args.Message);

    if (args.Exception != null)
    {
        Console.Out.WriteLine(args.Exception);
    }
};

new LavalinkCluster([...], [...], myLogger);

Thanks in advance!

NenoxAG commented 4 years ago

Hello,

yes i'm using the latest version of Lavalink4NET (1.4.12) and Lavalink (3.3.1).

Here is the Lavalink4NET log:

Connected to Lavalink Node!
Received payload: `{"playingPlayers":0,"op":"stats","memory":{"reservable":8436842496,"used":170429056,"free":362247552,"allocated":532676608},"players":0,"cpu":{"cores":10,"systemLoad":0.07212137099416738,"lavalinkLoad":0.10774647887323943},"uptime":251315}` from: ws://127.0.0.1:3330/.
Connected to Lavalink Node!
Received payload: `{"playingPlayers":0,"op":"stats","memory":{"reservable":8436842496,"used":154565184,"free":378111424,"allocated":532676608},"players":0,"cpu":{"cores":10,"systemLoad":0.03724814311436318,"lavalinkLoad":0.10739299610894941},"uptime":251623}` from: ws://127.0.0.1:3331/.
Loading track 'https://www.youtube.com/watch?v=A6Ple4aJRyA'...
Sent payload `{"op":"voiceUpdate","guildId":"xxx","sessionId":"xxx","event":{"token":"xxx","guild_id":xxx,"endpoint":"eu-central514.discord.media:80"}}` to ws://127.0.0.1:3330/.
Got response for track load: `https://www.youtube.com/watch?v=A6Ple4aJRyA`: {"playlistInfo":{},"loadType":"TRACK_LOADED","tracks":[{"track":"QAAAlQIAM1VubGlrZSBQbHV0byAtIEV2ZXJ5dGhpbmcgQmxhY2sgKGZlYXQuIE1pa2UgVGF5bG9yKQAIQ2xvdWRLaWQAAAAAAAN+iAALQTZQbGU0YUpSeUEAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1BNlBsZTRhSlJ5QQAHeW91dHViZQAAAAAAAAAA","info":{"identifier":"A6Ple4aJRyA","isSeekable":true,"author":"CloudKid","length":229000,"isStream":false,"position":0,"title":"Unlike Pluto - Everything Black (feat. Mike Taylor)","uri":"https://www.youtube.com/watch?v=A6Ple4aJRyA"}}]}.
Sent payload `{"op":"play","guildId":"xxx","track":"QAAAlQIAM1VubGlrZSBQbHV0byAtIEV2ZXJ5dGhpbmcgQmxhY2sgKGZlYXQuIE1pa2UgVGF5bG9yKQAIQ2xvdWRLaWQAAAAAAAN+iAALQTZQbGU0YUpSeUEAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1BNlBsZTRhSlJ5QQAHeW91dHViZQAAAAAAAAAA","startTime":0,"noReplace":false}` to ws://127.0.0.1:3330/.
Received payload: `{"op":"event","type":"TrackStartEvent","track":"QAAAlQIAM1VubGlrZSBQbHV0byAtIEV2ZXJ5dGhpbmcgQmxhY2sgKGZlYXQuIE1pa2UgVGF5bG9yKQAIQ2xvdWRLaWQAAAAAAAN+iAALQTZQbGU0YUpSeUEAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1BNlBsZTRhSlJ5QQAHeW91dHViZQAAAAAAAAAA","guildId":"xxx"}` from: ws://127.0.0.1:3330/.
Received bad payload: {"op":"event","type":"TrackStartEvent","track":"QAAAlQIAM1VubGlrZSBQbHV0byAtIEV2ZXJ5dGhpbmcgQmxhY2sgKGZlYXQuIE1pa2UgVGF5bG9yKQAIQ2xvdWRLaWQAAAAAAAN+iAALQTZQbGU0YUpSeUEAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1BNlBsZTRhSlJ5QQAHeW91dHViZQAAAAAAAAAA","guildId":"xxx"}.
System.ArgumentException: Could not convert 'TrackStartEvent' to EventType.
 ---> Newtonsoft.Json.JsonSerializationException: Error converting value "TrackStartEvent" to type 'Lavalink4NET.Payloads.EventType'. Path 'type'.
 ---> System.ArgumentException: Requested value 'TrackStartEvent' was not found.
   at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, String value, Boolean disallowNumber)
   at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
   at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
   at Newtonsoft.Json.Linq.JToken.ToObject[T]()
   at Lavalink4NET.Payloads.PayloadConverter.ReadPayload(String json)
   at Lavalink4NET.LavalinkSocket.ProcessNextPayload()
Reconnected to Lavalink Node!
Received payload: `{"playingPlayers":0,"op":"stats","memory":{"reservable":8436842496,"used":256414336,"free":276262272,"allocated":532676608},"players":0,"cpu":{"cores":10,"systemLoad":0.10149283638913936,"lavalinkLoad":0.10718185636287274},"uptime":271467}` from: ws://127.0.0.1:3330/

Thanks in advance!

angelobreuer commented 4 years ago

I identified the problem and I'm currently working on a fix and the implementation of the TrackStart event. Thanks for your report!

angelobreuer commented 4 years ago

I implemented the TrackStart event in the following commit: c3ecd31.

I will publish the release (1.4.13) on NuGet and GitHub Tags.

You can try out the built artifacts (https://ci.appveyor.com/project/angelobreuer/lavalink4net/builds/32098918/artifacts) from the CI server.