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

[BUG] Failed to parse Websocket messages #163

Open
ktwrd opened this issue Apr 5, 2024 · 0 comments
Open

[BUG] Failed to parse Websocket messages #163

ktwrd opened this issue Apr 5, 2024 · 0 comments

Comments

@ktwrd
Copy link

ktwrd commented Apr 5, 2024

Victoria will fail to parse any information on WebSocket that is greater than 512 bytes when using the latest v3 version of Lavalink (v3.7.11).

Currently I can only reproduce with LavaNode.PlayAsync().

Here is a screen recording of me reproducing the error

Here is the log output from Victoria in my C# Project.

[LOG]  [Discord->Gateway:1712319006322] Ready
[DEBG] [0] {"state":{"time":1712319015910,"position":0,"connected":true,"ping":0},"guildId":"824512928941735936","op":"playerUpdate"}
[WARN] [Discord->Gateway:1712319016228] A MessageUpdated handler is blocking the gateway task.
[DEBG] [0] {"encodedTrack":"QAAAngIAOFRoZSBRdWljayBCcm93biBGb3ggLSBORVJWRSdTIEVORElORyAtIFNMRUVQWSBFWUVTIEFHQUlOAAxITEEgYXJjaGl2ZXMAAAAAAAPIwAALdTZUMzQ2SmVCTlUAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj11NlQzNDZKZUJOVQAHeW91dHViZQAAAAAAAAAA","track":"QAAAngIAOFRoZSBRdWljayBCcm93biBGb3ggLSBORVJWRSdTIEVORE
lORyAtIFNMRUVQWSBFWUVTIEFHQUlOAAxITEEgYXJjaGl2ZXMAAAAAAAPIwAALdTZUMzQ2SmVCTlUAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj11NlQzNDZKZUJOVQAHeW91dHViZQAAAAAAAAAA","guildId":"824512928941735936","op":"event","type"
[ERR]  [0] Expected a value, but instead reached end of data. LineNumber: 0 | BytePositionInLine: 512.
======= Exception ========
System.Text.Json.JsonReaderException: Expected a value, but instead reached end of data. LineNumber: 0 | BytePositionInLine: 512.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ConsumePropertyName()
   at System.Text.Json.Utf8JsonReader.ConsumeNextToken(Byte marker)
   at System.Text.Json.Utf8JsonReader.ConsumeNextTokenOrRollback(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
   at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
   at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonDocumentOptions options)
   at Victoria.Node.LavaNode`2.OnDataAsync(DataEventArgs arg)
   at Victoria.WebSocket.WebSocketClient.ReceiveAsync()

And here is the log output from Lavalink.

2024-04-05 20:10:15.078  INFO 2740828 --- [  XNIO-1 task-1] l.server.player.AudioLoaderRestHandler   : Got request to load for identifier "ytsearch:sleepy eyes again tqbf"
2024-04-05 20:10:15.464  INFO 2740828 --- [   XNIO-1 I/O-1] lavalink.server.io.SocketServer          : {"guildId":"824512928941735936","sessionId":"d54b25147841fb2485212849ce6d9def","event":{"token":"09584a03e95d3d81","endpoint":"sydney3834.discord.media:443"},"op":"voiceUpdate"}
2024-04-05 20:10:15.644  INFO 2740828 --- [ader-2-thread-1] lavalink.server.player.AudioLoader       : Loaded playlist Search results for: sleepy eyes again tqbf
2024-04-05 20:10:15.649  INFO 2740828 --- [  XNIO-1 task-1] lavalink.server.io.RequestLoggingFilter  : GET /loadtracks?identifier=ytsearch%3Asleepy+eyes+again+tqbf, client=192.168.0.6
2024-04-05 20:10:32.872  INFO 2740828 --- [   XNIO-1 I/O-1] lavalink.server.io.SocketServer          : {"track":"QAAAngIAOFRoZSBRdWljayBCcm93biBGb3ggLSBORVJWRSdTIEVORElORyAtIFNMRUVQWSBFWUVTIEFHQUlOAAxITEEgYXJjaGl2ZXMAAAAAAAPIwAALdTZUMzQ2SmVCTlUAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj11NlQzNDZKZUJOVQAHeW91dHViZQAAAAAAAAAA","volume":100,"guildId":"824512928941735936","op":"play"}
2024-04-05 20:10:32.875  INFO 2740828 --- [back-1-thread-1] c.s.d.l.s.y.YoutubeAccessTokenTracker    : Updating YouTube visitor id (current is CgtGNlJoQldGRmpkSSiVz7-wBjIKCgJBVRIEGgAgSjoKIPDPnKDQ8vmHZg%3D%3D).
2024-04-05 20:10:33.041  INFO 2740828 --- [back-1-thread-1] c.s.d.l.s.y.YoutubeAccessTokenTracker    : Updating YouTube visitor id succeeded, new one is Cgt0dElBb3h0OTM4QSi41L-wBjIKCgJBVRIEGgAgJjoKIMXEl-mCx_qHZg%3D%3D, next update will be after 600 seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant