Closed MusclePr closed 6 months ago
This is not an issue with the voice chat mod. This was caused by Velocity/ViaVersion. Make sure to update them all. If you need more information/help about that issue visit out Discord server.
So turns out this might actually be a bug with the velocity plugin. We had users before where updating ViaVersion fixed the issue, but that does not seem to be the case.
[S ---> C] Custom Payload|voicechat:secret [ID:25]
In case of direct connect to server: (SUCCESS)
{
"data": "Vector of 56 unsigned chars",
"identifier": "voicechat:secret"
}
ID: 0x19 (=25 Custom Payload)
SIZE: 0x10 (=16)
Identifier: 0x76 0x6f 0x69 0x63 0x65 0x63 0x68 0x61 0x74 0x3a 0x73 0x65 0x63 0x72 0x65 0x74 (=voicechat:secret)
?: 0x8a 0x0c
----
UUID: 0xfd 0xcf 0x03 0xb7 0x7c 0x3a 0x79 0xc9 0x23 0xc3 0x31 0x0d 0xa2 0x35 0x00 0x00
Server Port: 0x5f 0x86 (=24454)
UUID: 0x7d 0x4c 0x96 0x96 0x6a 0x1a 0x3d 0xd4 0x80 0x0b 0xee 0xee 0xfd 0x4e 0xe8 0x78
Codec: 0x00
MTU Size: 0x00 0x00 0x04 0x00 (=1024)
voiceChatDistance: 0x40 0x48 0x00 0x00 0x00 0x00 0x00 0x00
keepAlive: 0x00 0x00 0x03 0xe8 (=1000)
groupEnabled: 0x01
voiceHost: 0x00
allowRecording: 0x01
In case of connect to server via Velocity: (ERROR)
{
"data": "Vector of 60 unsigned chars",
"identifier": "voicechat:secret"
}
ID: 0x19 (=25 Custom Payload)
SIZE: 0x10 (=16)
Identifier: 0x76 0x6f 0x69 0x63 0x65 0x63 0x68 0x61 0x74 0x3a 0x73 0x65 0x63 0x72 0x65 0x74 (=voicechat:secret)
?: 0xe5 0xa0
----
UUID: 0x8c 0xc4 0x5d 0x43 0x0b 0x8b 0x0e 0x44 0x41 0xdf 0x07 0xbb 0x7b 0x53 0x00 0x00
Server Port: 0x63 0xe9 (=25577)
UUID: 0x7d 0x4c 0x96 0x96 0x6a 0x1a 0x3d 0xd4 0x80 0x0b 0xee 0xee 0xfd 0x4e 0xe8 0x78
Codec: 0x00
MTU Size: 0x00 0x00 0x04 0x00 (=1024)
voiceChatDistance: 0x40 0x48 0x00 0x00 0x00 0x00 0x00 0x00
keepAlive: 0x00 0x00 0x03 0xe8 (=1000)
groupsEnabled: 0x01
voiceHost: 0x00
allowRecording: 0x01
UNKOWN: 0x00 0x00 0x00 0x00 <----- maybe problem
It seemed like the Velocity plugin was always sending the maximum allocated buffer size.
Maybe this will fix it?
buf.writeUtf(voiceHost, 32767);
buf.writeBoolean(allowRecording);
+ buffer.flip();
return buffer;
}
I have confirmed that there is no problem with both 1.20.4 and 1.20.6.
+ buffer.flip();
return buffer;
It seemed like the Velocity plugin was always sending the maximum allocated buffer size.
Maybe this will fix it?
buf.writeUtf(voiceHost, 32767); buf.writeBoolean(allowRecording); + buffer.flip(); return buffer; }
I just tested it out and the issue still persists using your suggestion.
Maybe i missed something?
byte[] data = new byte[buffer.position()];
System.arraycopy(buffer.array(), 0, data, 0, buffer.position());
return ByteBuffer.wrap(data);
This seems to work though...
Confirmation
Bug description
Error occurred connect via Velocity from Minecraft 1.20.6
Client
Proxy
Server
Minecraft version
1.20.6
Mod/Plugin version
Mod 1.20.6-2.5.15/Server Plugin 2.5.13/Velocity Plugin 2.5.12(beta)
Mod/Plugin loader and version
Fabric Loader 0.15.11-1.20.6
Steps to reproduce
Requires docker.
./setup.sh
on your new working directory.docker compose up
localhost:25565
(velocity)localhost:25566
(no proxied server)Expected behavior
No error to connect
Log files
https://gist.github.com/MusclePr/718889be7049acb662ad81db96b083ef
Screenshots
No response