ViaVersion / ViaProxy

Standalone proxy which allows players to join EVERY Minecraft server version (Classic, Alpha, Beta, Release, Bedrock)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Internal Exception: ionetty.handler.codec.DecoderException

SkyEye-FAST opened this issue · comments

I run ViaProxy with the following command:
sudo java -jar "ViaProxy-3.0.22.jar" --bp 61095 -a 127.0.0.1 -p 61099 -v 1.20.2

The original server is running using Vanilla 1.20.2 with server-port=61099 in server.properties.

1.20.2 client is able to join the server using port 61099:
image

Any client below 1.20.2 cannot join the server using port 61095 , which will cause an error.

In 1.19.4:

Internal Exception: io.netty.handler.codec.DecoderException:
java.io.IOException: Packet 0/4 (class_2616) was larger than I expected.
found 2 bytes extra whilst reading packet 4

image

In 1.8.9:

Internal Exception: io.netty.handler.codec.DecoderException:
java.lang.IndexOutOfBoundsException: readerIndex(4) + length(2) exceeds writerindex(5):
UnpooledHeapByteBuf(ridx: 4, widx: 5, cap: 5)

image

ViaProxy log is as follows:

[00:52:16] [main/INFO] (ViaProxy) Initializing ViaProxy CLI v3.0.22 (git-ViaProxy-3.0.22:1aa0740) (Injected using Launcher Agent)...
[00:52:16] [main/INFO] (ViaProxy) Using java version: OpenJDK 64-Bit Server VM 21 (Azul Systems, Inc.) on Linux
[00:52:16] [main/INFO] (ViaProxy) Available memory (bytes): 2543845376
[00:52:17] [Via-Mappingloader-0/INFO] (ViaVersion) Loading block connection mappings ...
[00:52:17] [ViaLoader/INFO] (ViaBackwards) Loading translations...
[00:52:17] [ViaLoader/INFO] (ViaBackwards) Registering protocols...
[00:52:18] [ViaLoader/INFO] (ViaBedrock) Started resource pack HTTP server on http://127.0.0.1:38683/
[00:52:18] [ViaLoader/INFO] (ViaVersion) ViaVersion detected lowest supported version by the proxy: 1.7.2-1.7.5 (4)
[00:52:18] [ViaLoader/INFO] (ViaVersion) Highest supported version by the proxy: 23w44a (765)
[00:52:18] [main/INFO] (ViaProxy) ViaProxy started successfully!
[00:52:18] [main/INFO] (ViaProxy) Starting proxy server
[00:52:18] [main/INFO] (ViaProxy) Binding proxy server to 0.0.0.0:61095
[00:52:23] [Via Async Scheduler 0/INFO] (ViaVersion) Finished mapping loading, shutting down loader executor!
[01:05:34] [Netty Epoll Server IO #0/INFO] (ViaProxy) [CONNECT] ( xxx.xxx.xxx.xx | null) [1.19.4 <-> 1.20.2] Connecting to 127.0.0.1:61099
[01:05:34] [Netty Epoll Client IO #0/INFO] (ViaProxy) [DISCONNECT] ( xxx.xxx.xxx.xx | null) Connection closed
[01:05:52] [Netty Epoll Server IO #1/INFO] (ViaProxy) [CONNECT] ( xxx.xxx.xxx.xx | null) [1.19.4 <-> 1.20.2] Connecting to 127.0.0.1:61099
[01:05:52] [Netty Epoll Server IO #2/INFO] (ViaProxy) [CONNECT] ( xxx.xxx.xxx.xx | null) [1.19.4 <-> 1.20.2] Connecting to 127.0.0.1:61099
[01:05:52] [Netty Epoll Server IO #2/INFO] (ViaProxy) [AUTH] ( xxx.xxx.xxx.xx | SkyEye_FAST) Filling player data
[01:05:52] [Netty Epoll Client IO #2/INFO] (ViaProxy) [SESSION] ( xxx.xxx.xxx.xx | SkyEye_FAST) Connected successfully! Switching to PLAY state
[01:05:52] [Netty Epoll Client IO #1/INFO] (ViaProxy) [DISCONNECT] ( xxx.xxx.xxx.xx | null) Connection closed
[01:05:52] [Netty Epoll Client IO #2/INFO] (ViaProxy) [DISCONNECT] ( xxx.xxx.xxx.xx | SkyEye_FAST) Connection closed
[01:08:25] [Netty Epoll Server IO #3/INFO] (ViaProxy) [CONNECT] ( xxx.xxx.xxx.xx | null) [1.8.x <-> 1.20.2] Connecting to 127.0.0.1:61099
[01:08:25] [Netty Epoll Server IO #4/INFO] (ViaProxy) [CONNECT] ( xxx.xxx.xxx.xx | null) [1.8.x <-> 1.20.2] Connecting to 127.0.0.1:61099
[01:08:25] [Netty Epoll Server IO #3/INFO] (ViaProxy) [AUTH] ( xxx.xxx.xxx.xx | SkyEye_FAST) Filling player data
[01:08:25] [Netty Epoll Client IO #3/INFO] (ViaProxy) [SESSION] ( xxx.xxx.xxx.xx | SkyEye_FAST) Connected successfully! Switching to PLAY state
[01:08:25] [Netty Epoll Client IO #4/INFO] (ViaProxy) [DISCONNECT] ( xxx.xxx.xxx.xx | null) Connection closed
[01:08:25] [Netty Epoll Client IO #3/INFO] (ViaProxy) [DISCONNECT] ( xxx.xxx.xxx.xx | SkyEye_FAST) Connection closed
[01:08:34] [Netty Epoll Server IO #5/INFO] (ViaProxy) [CONNECT] ( xxx.xxx.xxx.xx | null) [1.8.x <-> 1.20.2] Connecting to 127.0.0.1:61099
[01:08:34] [Netty Epoll Server IO #5/INFO] (ViaProxy) [AUTH] ( xxx.xxx.xxx.xx | SkyEye_FAST) Filling player data
[01:08:34] [Netty Epoll Client IO #5/INFO] (ViaProxy) [SESSION] ( xxx.xxx.xxx.xx | SkyEye_FAST) Connected successfully! Switching to PLAY state
[01:08:34] [Netty Epoll Client IO #5/INFO] (ViaProxy) [DISCONNECT] ( xxx.xxx.xxx.xx | SkyEye_FAST) Connection closed
[01:15:33] [Netty Epoll Server IO #7/INFO] (ViaProxy) [CONNECT] ( xxx.xxx.xxx.xx | null) [1.8.x <-> 1.20.2] Connecting to 127.0.0.1:61099
[01:15:33] [Netty Epoll Server IO #6/INFO] (ViaProxy) [CONNECT] ( xxx.xxx.xxx.xx | null) [1.8.x <-> 1.20.2] Connecting to 127.0.0.1:61099
[01:15:33] [Netty Epoll Server IO #6/INFO] (ViaProxy) [AUTH] ( xxx.xxx.xxx.xx | SkyEye_FAST) Filling player data
[01:15:34] [Netty Epoll Client IO #7/INFO] (ViaProxy) [SESSION] ( xxx.xxx.xxx.xx | SkyEye_FAST) Connected successfully! Switching to PLAY state
[01:15:34] [Netty Epoll Client IO #6/INFO] (ViaProxy) [DISCONNECT] ( xxx.xxx.xxx.xx | null) Connection closed
[01:15:34] [Netty Epoll Client IO #7/INFO] (ViaProxy) [DISCONNECT] ( xxx.xxx.xxx.xx | SkyEye_FAST) Connection closed

Vanilla server log is as follows:

[Server] [01:05:52] [Server thread/INFO]: com.mojang.authlib.GameProfile@b803d76[id=af27d0a4-bf98-37ce-9f85-692d12f3101b,name=SkyEye_FAST,properties={}] lost connection: Disconnected
[Server] [01:08:25] [Server thread/INFO]: com.mojang.authlib.GameProfile@287135b0[id=af27d0a4-bf98-37ce-9f85-692d12f3101b,name=SkyEye_FAST,properties={}] lost connection: Disconnected
[Server] [01:08:34] [Server thread/INFO]: com.mojang.authlib.GameProfile@3c0b1d83[id=af27d0a4-bf98-37ce-9f85-692d12f3101b,name=SkyEye_FAST,properties={}] lost connection: Disconnected
[Server] [01:15:34] [Server thread/INFO]: com.mojang.authlib.GameProfile@4467e625[id=af27d0a4-bf98-37ce-9f85-692d12f3101b,name=SkyEye_FAST,properties={}] lost connection: Disconnected

Could not reproduce the issue on a clean vanilla 1.20.2 server. Can you try using the latest dev build of ViaProxy: https://ci.viaversion.com/view/Platforms/job/ViaProxy/lastSuccessfulBuild/artifact/build/libs/ViaProxy-3.0.23-SNAPSHOT.jar

Could not reproduce the issue on a clean vanilla 1.20.2 server. Can you try using the latest dev build of ViaProxy: https://ci.viaversion.com/view/Platforms/job/ViaProxy/lastSuccessfulBuild/artifact/build/libs/ViaProxy-3.0.23-SNAPSHOT.jar

I’ve already tried 3.0.21, 3.0.22 and 3.0.23-SNAPSHOT (newest build), but there was nothing different.
Maybe I’ll reset the server configuration and try again in the daytime (It's midnight in UTC+8).

After checking, I found out that I was using a Fabric server with only Fabric API installed (that was installed automatically), not 100% vanilla server.

It's the Fabric API that causes the protocol error. A Fabric server without Fabric API installed can be used with ViaProxy normally.

That's weird. When the server version was 1.20.1, I also used a Fabric server with Fabric API installed, but ViaProxy still works fine.

Could you please check the changes to the Fabric API after 1.20.1? Logically speaking, installing ViaFabric on a Fabric server should have the same effect as using ViaProxy independently, so Fabric API should not prevent ViaProxy from working.

Known issue: ViaVersion/ViaFabric#275
There isn't a fix currently

Known issue: ViaVersion/ViaFabric#275 There isn't a fix currently

... Well, so this is actually a problem of ViaFabric.

It's a problem of ViaBackwards/ViaVersion, the protocol translation library both ViaFabric and ViaProxy are using.