Skip to content

"Can't serialize unregistered packet" with ViaVersion and BungeeCord #1166

@Maxi451

Description

@Maxi451

What happened?

Trying to log in with a 1.20.4 premium vanilla client to a 1.12.2 PaperSpigot server causes to be disconnected with error "Internal Exception: io.netty.handler.codec.EncoderException: java.io.IOException: Can't serialize unregistered packet"

What did you expect?

I expected the 1.20.2+ premium client to be sent to the "hub" server without any issue

Steps to reproduce

Server setup:

Latest version BungeeCord (git:BungeeCord-Bootstrap:1.20-R0.3-SNAPSHOT:7606d44:1801) with the following plugins:

  • AuthMeBungee-2.2.0-SNAPSHOT
  • FastLoginBungee.jar (1.12-SNAPSHOT-a65a5f3 (? latest anyway))

"login" server: PaperSpigot 1.12.2 with the following plugins:

  • AuthMe-5.6.0-SNAPSHOT-legacy
  • FastLoginBukkit (1.12-SNAPSHOT-a65a5f3)
  • ViaVersion-4.9.3
  • ViaBackwards-4.9.2
  • ViaRewind-3.0.6-SNAPSHOT

"hub" server: PaperSpigot 1.12.2 with the following plugins:

  • ViaVersion-4.9.3
  • ViaBackwards-4.9.2
  • ViaRewind-3.0.6-SNAPSHOT

Clients below 1.20.2 don't seem to experience any issue
Steps:

  • 1.20.2+ premium vanilla client connects for the first time to the BungeeCord
  • player is sent to the "login" server
  • everything good, player automatically registered as premium as expected
  • player sent to "hub" server
  • client logs in again. Three possibilities:
    • everything goes fine
    • client is locked in the "login" server with the "Already authenticated" message, but AuthMe doesn't allow chat or commands
      • if the player logs in again this issue is gone
    • client is successfully authenticated and sent to the "hub" server, but then gets kicked with the message "Internal Exception: io.netty.handler.codec.EncoderException: java.io.IOException: Can't serialize unregistered packet"
      • if the player is not sent to the "hub" server (i.e. banned) and don't get the "Already authenticated" issue he can freely join (with /server) any 1.20.4 server without issues, but should he try to join an older version (tried 1.12.2 and 1.8.8) he will get kicked for the "Internal exception" error

If I remove FastLogin these errors disappear
This error seems to appear when a 1.20.2+ player switches server to an older version, and seems to be some sort of malformed json (maybe 1.20.2+ players have issues with jsons starting with square brackets). Also, a friend of mine with the same client experiences this issue a lot less

Plugin list

No response

Configuration file

https://pastebin.com/ygXqyZDi

Server log

Bungee:

23:48:19 [INFO] [/-] <-> InitialHandler has pinged
23:48:20 [INFO] [TheSniper99,/-] <-> InitialHandler has connected
23:48:20 [INFO] [FastLogin] Incoming login request for TheSniper99 from /-
23:48:20 [INFO] [FastLogin] Handling player TheSniper99
23:48:20 [INFO] [FastLogin] Requesting premium login for registered player: TheSniper99
23:48:20 [INFO] [TheSniper99] <-> ServerConnector [login] has connected
23:48:21 [INFO] [TheSniper99] <-> ServerConnector [hub] has connected
23:48:21 [INFO] [TheSniper99] <-> DownstreamBridge <-> [login] has disconnected
23:48:22 [INFO] [TheSniper99] -> UpstreamBridge has disconnected
23:48:22 [INFO] [TheSniper99] <-> DownstreamBridge <-> [hub] has disconnected

Login:

[23:48:20 INFO]: UUID of player TheSniper99 is 7ae4946c-10a4-47ff-b173-2cb4a19c87f8
[23:48:20 INFO]: TheSniper99[/-] logged in with entity id 5 at ([world]0.5, 100.0, 0.5)
[23:48:20 INFO]: [AuthMe] TheSniper99 logged in -
[23:48:21 INFO]: [FastLogin] Player info LOGIN command for TheSniper99 from proxy
[23:48:21 INFO]: [FastLogin] Delaying force login until join event fired?: false
[23:48:21 INFO]: [FastLogin] Logging player TheSniper99 in
[23:48:21 WARN]: [FastLogin] Player CraftPlayer{name=TheSniper99} is already authenticated. Cancelling force login.
[23:48:21 INFO]: TheSniper99 lost connection: Disconnected

Hub:

[23:48:21 INFO]: UUID of player TheSniper99 is 7ae4946c-10a4-47ff-b173-2cb4a19c87f8
[23:48:21 INFO]: TheSniper99[/-] logged in with entity id 3 at ([hub]0.5, 160.0, 0.5)
[23:48:22 INFO]: [FastLogin] No on-going login session for player: CraftPlayer{name=TheSniper99} with ID -.
[23:48:22 INFO]: [FastLogin] Setups using Minecraft proxies will start delayed when the command from the proxy is received
[23:48:22 INFO]: TheSniper99 lost connection: Disconnected
[23:48:22 INFO]: TheSniper99 left the game

Plugin version

1.12-SNAPSHOT-a65a5f3

Platform

BungeeCord

Relevance

  • I tried the latest build
    (build refers to development builds not necessary a release version; i.e. v1.10 is out of date)

  • I checked for existing tickets -
    If there are, please vote them with a thumbs reaction and not create new ones

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions