Minecraft-Console-Client icon indicating copy to clipboard operation
Minecraft-Console-Client copied to clipboard

[BUG] Joining a 1.21 server works but get kicked immediately

Open BurkenDev opened this issue 1 year ago • 8 comments

Prerequisites

  • [X] I made sure I am running the latest development build
  • [X] I tried to look for similar issues before opening a new one
  • [X] I have set debugmessages=true in config to diagnose my issue
  • [X] I have redacted session tokens and passwords before attaching screenshots

Minecraft Version

1.20.6 / 1.20.4 / 1.21

Console Client Version

Latest

Expected Behavior

Be able to join the server

Actual Behavior

Joining a server works but get kicked immediately

Steps to Reproduce the bug

Join a 1.21 server which also runs the latest version of ViaVersion should work with an older client like this.

Attach screenshot here (If applicable)

Connecting to Microsoft... Using Minecraft version 1.20 (protocol v763) Cached profile key needs to be refreshed. Fetching profile key from Microsoft. [MCC] Version is supported. Logging in... [MCC] Checking Session... [MCC] Server was successfully joined. Type '/quit' to leave the server. ▌<Redacted> has joined the network. (smp4)

Unhandled exception. System.IO.InvalidDataException: Failed to process incoming packet of type JoinGame. (PacketID: 40, Protocol: 763, LoginPhase: False, InnerException: System.Collections.Generic.KeyNotFoundException). ---> System.Collections.Generic.KeyNotFoundException: The given key 'minecraft:chat_type' was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key) at MinecraftClient.Protocol.Message.ChatParser.ReadChatType(Dictionary2 registryCodec) at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePlayPackets(Int32 packetId, Queue1 packetData) at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue1 packetData) --- End of inner exception stack trace --- at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) at MinecraftClient.Protocol.Handlers.Protocol18Handler.Updater(Object o) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) Aborted

Anythings that could help diagnosing the bug

No response

Device

Other

Operating System

Linux

Server Address (If applicable)

No response

BurkenDev avatar Jul 02 '24 07:07 BurkenDev

Join our discord, refer to this message on how to fix this: https://discord.com/channels/1018553894831403028/1250864891993129080/1256971761900326937

milutinke avatar Jul 02 '24 09:07 milutinke

How are you able to connect to 1.21 servers in the first place? I'm always getting the message "This version is not supported!" (built by myself from lastest master branch).

Xitee1 avatar Jul 03 '24 14:07 Xitee1

I tried Minecraft 1.18 and it worked. The server runs ViaVersion and ViaBackwards.

Server version : Velocity 1.7.2-1.21 (protocol v767)
Cannot connect to the server : This version is not supported !
Server version :
Restarting Minecraft Console Client...
Settings have been loaded from MinecraftClient.ini
You chose to run in offline mode.
Using Minecraft version 1.18 (protocol v757)
[MCC] Version is supported.
Logging in...
[MCC] Server is in offline mode.
[MCC] Server was successfully joined.
Type '/quit' to leave the server.
fakeplayer1 joined the game

C0j23T avatar Jul 07 '24 14:07 C0j23T

The server needs to add ViaVersion and ViaBackwards

Ok, I thought there already is support for 1.21. Using ViaBackwards and version 1.19 I can join the server. A bit overkill for my server having to install 3 additional plugins (+ViaVersionStatus for unaware players) but at least it works and I can AFK at my farms again.

Xitee1 avatar Jul 07 '24 15:07 Xitee1

加入我们的 discord,请参阅此消息以了解如何解决此问题:https://discord.com/channels/1018553894831403028/1250864891993129080/1256971761900326937

I can't join the discord because the invitation in GitHub is no longer valid and can't get help

theabab2333 avatar Jul 08 '24 13:07 theabab2333

加入我们的 discord,请参阅此消息以了解如何解决此问题:https://discord.com/channels/1018553894831403028/1250864891993129080/1256971761900326937

I can't join the discord because the invitation in GitHub is no longer valid and can't get help

https://discord.gg/HGeUZhF2

milutinke avatar Jul 08 '24 20:07 milutinke

加入我们的 discord,请参阅此消息以了解如何解决此问题:https://discord.com/channels/1018553894831403028/1250864891993129080/1256971761900326937

I can't join the discord because the invitation in GitHub is no longer valid and can't get help

https://discord.gg/HGeUZhF2

thanks

theabab2333 avatar Jul 09 '24 04:07 theabab2333

The server needs to add ViaVersion and ViaBackwards

Ok, I thought there already is support for 1.21. Using ViaBackwards and version 1.19 I can join the server. A bit overkill for my server having to install 3 additional plugins (+ViaVersionStatus for unaware players) but at least it works and I can AFK at my farms again.

I don't know what happened but it no longer works with ViaVersion for me. I am able to join the server and stay connected for about 3 seconds. Then I get kicked with this error message:

Using Minecraft version 1.19.0 (protocol v759)
§8Cached profile key is still valid for (removed).
§8[MCC] Version is supported.
Logging in...
§8[MCC] Checking Session...
§8[MCC] Server was successfully joined.
Type '/quit' to leave the server.
> Unhandled exception. System.IO.InvalidDataException: Failed to process incoming packet of type JoinGame. (PacketID: 35, Protocol: 759, LoginPhase: False, InnerException: System.Collections.Generic.KeyNotFoundException).
 ---> System.Collections.Generic.KeyNotFoundException: The given key 'minecraft:dimension_type' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at MinecraftClient.Mapping.World.StoreDimensionList(Dictionary`2 registryCodec) in /home/runner/work/Minecraft-Console-Client/Minecraft-Console-Client/MinecraftClient/Mapping/World.cs:line 62
   at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePlayPackets(Int32 packetId, Queue`1 packetData) in /home/runner/work/Minecraft-Console-Client/Minecraft-Console-Client/MinecraftClient/Protocol/Handlers/Protocol18.cs:line 601
   at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) in /home/runner/work/Minecraft-Console-Client/Minecraft-Console-Client/MinecraftClient/Protocol/Handlers/Protocol18.cs:line 457
   --- End of inner exception stack trace ---
   at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) in /home/runner/work/Minecraft-Console-Client/Minecraft-Console-Client/MinecraftClient/Protocol/Handlers/Protocol18.cs:line 489
   at MinecraftClient.Protocol.Handlers.Protocol18Handler.Updater(Object o) in /home/runner/work/Minecraft-Console-Client/Minecraft-Console-Client/MinecraftClient/Protocol/Handlers/Protocol18.cs:line 259
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Aborted (core dumped)

Is there any progess for 1.21?

Xitee1 avatar Sep 14 '24 13:09 Xitee1

Closing in favor of #2738. The issues mentioned above has also been fixed in the latest MCC.

Source code for the current development build can be built from this source: https://github.com/milutinke/Minecraft-Console-Client/tree/1.20.6

If you don't want to build from source, you can get an alternative build here: https://github.com/Robert-Kidder/Minecraft-Console-Client/releases/tag/20241026-9

breadbyte avatar Dec 25 '24 02:12 breadbyte