Open amnotbananaama opened 3 years ago
First of all I just wanna say that I love your report, really detailed and nice to look at! :D
Now to how this issue can be fixed. We need to know is what is kicking the player, is it the proxy, or the server?
If it's the server then making the proxy connect at the same time as the client might fix it. Since the proxy might have different behavior that the fabric api doesn't like.
But if it's the proxy that's kicking, then it might be because fabric is sending a custom packet and the minecraft node library has a list of "allowed" packets. The fabric packet then makes the proxy freak out because the packet name isn't on that list. The proxy then kicks the player and disconnects. To fix this you would have to edit the node library code and put a custom version which I would do if there isn't another solution.
Does the fabric server log say anything about the player? Does it show the player connecting?
Summary
Players are unable to connect to the proxy if the server has Fabric API installed. Fabric API is a library mod for the Fabric modloader, and provides many essential events and hooks for Fabric mod developers. Connecting to a server with Fabric API without minecraft-packet-proxy works. Likewise, connecting to minecraft-packet-proxy works if the server doesn't have Fabric API installed.
Reproduction Steps
Bash one-liner install command
<server root>/mods
directory.Fabric API download
https://www.curseforge.com/minecraft/mc-mods/fabric-api/download/3147523/file (Latest version at the time of this writing)
Launch the Fabric server. (
java -jar fabric-server-launch.jar --nogui
).Launch minecraft-packet-proxy and "Connect" to the server.
You get this packet from the server
Attempt to connect to the proxy. -> :x: You get this error on the client: -> :x: An empty server packet shows up for minecraft-packet-proxy:
Disable the proxy, and connect to the server directly. -> ✔️ Clients can connect without issue
Rename Fabric API to
.jar.foo
to prevent the mod from being loaded, and re-launch the server and the proxy. -> ✔️ Clients can connect to the proxy without issueLoad a Fabric mod which does not use or require Fabric API, such as Lithium and re-launch the server and the proxy. -> ✔️ Clients can connect to the proxy without issue
Additional Info
My guess is that the networking module of Fabric API is doing something that the proxy doesn't understand or like. Unfortunately, I don't know how to get a full printout of the invalid JSON in step 6, it is not saved to the log file. I hope this is helpful, and thank you for creating this tool!