Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Unable to join Servers with Fabric API installed #1

@amnotbananaama

Description

@amnotbananaama

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

  1. Set up a Fabric server
Bash one-liner install command
wget -O fabric-installer-0.6.1.51.jar https://maven.fabricmc.net/net/fabricmc/fabric-installer/0.6.1.51/fabric-installer-0.6.1.51.jar && java -jar fabric-installer-0.6.1.51.jar server -downloadMinecraft
  1. Place the Fabric API mod in the <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)

  1. Launch the Fabric server.
    (java -jar fabric-server-launch.jar --nogui).

  2. Launch minecraft-packet-proxy and "Connect" to the server.

You get this packet from the server
(Server) login_plugin_request: {"messageId":0,"channel":"fabric-networking-api-v1:early_registration","data":{"type":"Buffer","data":[0]}}
  1. Attempt to connect to the proxy.
    -> ❌ You get this error on the client:
    -> ❌ An empty server packet shows up for minecraft-packet-proxy:
(Server) login: {}
  1. Disable the proxy, and connect to the server directly.
    -> ✔️ Clients can connect without issue

  2. 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 issue

  3. Load 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions