ME1312 / VanillaCord

VanillaCord – IP Forwarding support for Vanilla Minecraft Servers
Mozilla Public License 2.0
75 stars 11 forks source link

Connection fails for a 1.19 server #20

Closed Yidna closed 2 years ago

Yidna commented 2 years ago

Expected Behaviour

I should be able to log into a 1.19 server served by the jar generated by VanillaCord through the latest BungeeCord (build 1644)

Actual Behaviour

The VanillaCord server logs no errors. Client and BungeeCord server fails the connection with logs:

00:35:26 [INFO] [<User>] disconnected with: Kicked whilst connecting to <server_name>: Internal Exception: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    agj.a(Lzf;)V @131: putfield
  Reason:
    Type 'agj' (current frame, stack[1]) is not assignable to 'com/mojang/authlib/GameProfile'
  Current Frame:
    bci: @131
    flags: { }
    locals: { 'agj', 'zf', 'com/mojang/authlib/GameProfile' }
    stack: { 'com/mojang/authlib/GameProfile', 'agj' }
  Bytecode:
    0000000: 2ab4 004a b200 48a6 0007 04a7 0004 0313
    0000010: 0139 03bd 0004 b801 3f2b b601 41b8 0144
    0000020: 1301 4603 bd00 04b8 013f 2a2b 2ab4 004e
    0000030: b601 4a2a b400 4eb6 014d b801 4fb5 00e7
    0000040: a700 274d b200 922c b601 522c b601 56b9
    0000050: 00b1 0300 2ab4 0050 b600 c69a 000c 2a2c
    0000060: b601 59b6 008d b12a b400 4eb6 015d 4d2c
    0000070: c600 1a2b b601 412c b601 60b6 0163 9900
    0000080: 0c2c 2ab5 0071 b500 4ab1 2abb 0073 5901
    0000090: 2b03 b701 66b5 0071 2ab4 004e b601 6999
    00000a0: 003a 2ab4 0050 b600 c69a 0030 2ab2 016b
    00000b0: b500 4a2a b400 50bb 016d 5912 3d2a b400
    00000c0: 4eb6 0171 b601 77b9 017d 0100 2ab4 005f
    00000d0: b701 80b6 00a9 a700 0a2a b200 65b5 004a
    00000e0: b1                                     
  Exception Handler Table:
    bci [42, 64] => handler: 67
  Stackmap Table:
    same_frame(@14)
    same_locals_1_stack_item_frame(@15,Integer)
    same_locals_1_stack_item_frame(@67,Object[#9])
    same_frame(@103)
    append_frame(@138,Object[#115])
    same_locals_1_stack_item_extended(@217,Object[#2])
    same_locals_1_stack_item_frame(@224,Object[#2])

00:35:26 [INFO] [<User>] -> UpstreamBridge has disconnected
00:35:26 [INFO] [<User>] <-> ServerConnector [<server_name>] has disconnected

Additional Testing Notes

ME1312 commented 2 years ago

This issue was similar to #17 in 1.18. Again, Mojang has added a bunch of code above the thing we're trying to modify. Since I expect that this will keep happening, I rewrote the patch to make it more resilient when faced with these types of changes.

Yidna commented 2 years ago

Great, I'll give it a test later today