Closed kevin126ckw closed 7 months ago
I do not get that message, I get kicked with: "Loaded chunk packet wrongly" which is not a standard Minecraft server error, the server uses Bungeecord, and probably has a plugin that causes issues. I am unable to debug this one, maybe try using a different version.
I have the same issue with vanilla 1.20
Log
Minecraft Console Client v1.20.4 - for MC 1.4.6 to 1.20.4 - Github.com/MCCTeam
Resolving 127.0.0.1...
[MCC] [ScriptScheduler] Loaded task:
triggeronfirstlogin: False
triggeronlogin: False
triggerontime: True
triggeroninterval: True
timevalue: 14:00:00
timeinterval: 53.4
action: send /hello
[MCC] [ScriptScheduler] Loaded task:
triggeronfirstlogin: False
triggeronlogin: True
triggerontime: False
triggeroninterval: False
timevalue:
timeinterval: 56
action: send /login pass
Color test: Your terminal should display [0123456789ABCDEF]: (4bit)[0123456789ABCDEF]
Color test: Your terminal should display [0123456789]: (vt100 8bit)[0123456789]
Color test: Your terminal should display [0123456789]: (vt100 24bit)[0123456789]
[SessionCache] Initializing FileSystemWatcher for file: D:\SessionCache.ini
Loading session cache from disk: SessionCache.ini
Server version : 1.20 (protocol v763)
[KeysCache] Initializing FileSystemWatcher for file: D:\ProfileKeyCache.ini
Loading profile key cache from disk: ProfileKeyCache.ini
Loaded profile key, it will be refresh at 2024/3/16 8:36:39
Profile keys has been successfully loaded from disk.
Cached profile key is still valid for asd.
[MCC] Version is supported.
Logging in...
[DEBUG] Crypto keys & hash generated.
[MCC] Server was successfully joined.
Type '/quit' to leave the server.
> Unhandled exception. System.IO.InvalidDataException: Failed to process incoming packet of type ProfilelessChatMessage. (PacketID: 28, Protocol: 763, LoginPhase: False, InnerException: System.InvalidOperationException).
---> System.InvalidOperationException: Queue empty.
at System.Collections.Generic.Queue`1.ThrowForEmptyQueue()
at System.Collections.Generic.Queue`1.Dequeue()
at MinecraftClient.Protocol.Handlers.DataTypes.ReadNextChat(Queue`1 cache) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\DataTypes.cs:line 1068
at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePlayPackets(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 1050
at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 447
--- End of inner exception stack trace ---
at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 459
at MinecraftClient.Protocol.Handlers.Protocol18Handler.Updater(Object o) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 253
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)
Vanilla 1.20.1 can also reproduce the bug, 1.20.2 and 1.20.4 works fine.
Log 1.20.1
Minecraft Console Client v1.20.4 - for MC 1.4.6 to 1.20.4 - Github.com/MCCTeam
[MCC] [ScriptScheduler] Loaded task:
triggeronfirstlogin: False
triggeronlogin: False
triggerontime: True
triggeroninterval: True
timevalue: 14:00:00
timeinterval: 53.4
action: send /hello
[MCC] [ScriptScheduler] Loaded task:
triggeronfirstlogin: False
triggeronlogin: True
triggerontime: False
triggeroninterval: False
timevalue:
timeinterval: 56
action: send /login pass
Color test: Your terminal should display [0123456789ABCDEF]: (4bit)[0123456789ABCDEF]
Color test: Your terminal should display [0123456789]: (vt100 8bit)[0123456789]
Color test: Your terminal should display [0123456789]: (vt100 24bit)[0123456789]
[SessionCache] Initializing FileSystemWatcher for file: D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\bin\Debug\net7.0\SessionCache.ini
Loading session cache from disk: SessionCache.ini
Loaded session:
Loaded session:
Session data has been successfully loaded from disk.
Access token expiration time is 2024/3/15 23:39:50
Cached session is still valid for oldkingOK.
Saving session cache to disk
Success. (session ID:
Retrieving Server Info...
Performing request to sessionserver.mojang.com
Loading session cache from disk: SessionCache.ini
Loaded session:
Server version : 1.20.1 (protocol v763)
[KeysCache] Initializing FileSystemWatcher for file: D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\bin\Debug\net7.0\ProfileKeyCache.ini
Loading profile key cache from disk: ProfileKeyCache.ini
Loaded profile key, it will be refresh at 2024/3/16 8:36:39
Loaded profile key, it will be refresh at 2024/3/16 15:39:52
Profile keys has been successfully loaded from disk.
Cached profile key is still valid for oldkingOK.
[MCC] Version is supported.
Logging in...
[DEBUG] Crypto keys & hash generated.
[MCC] Checking Session...
Performing request to sessionserver.mojang.com
Saving session cache to disk
Loading session cache from disk: SessionCache.ini
Loaded session: So
[MCC] Server was successfully joined.
Type '/quit' to leave the server.
> Unhandled exception. System.IO.InvalidDataException: Failed to process incoming packet of type ProfilelessChatMessage. (PacketID: 28, Protocol: 763, LoginPhase: False, InnerException: System.InvalidOperationException).
---> System.InvalidOperationException: Queue empty.
at System.Collections.Generic.Queue`1.ThrowForEmptyQueue()
at System.Collections.Generic.Queue`1.Dequeue()
at MinecraftClient.Protocol.Handlers.DataTypes.ReadNextChat(Queue`1 cache) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\DataTypes.cs:line 1068
at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePlayPackets(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 1051
at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 447
--- End of inner exception stack trace ---
at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 459
at MinecraftClient.Protocol.Handlers.Protocol18Handler.Updater(Object o) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 253
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)
Vanilla 1.20.1 can also reproduce the bug, 1.20.2 and 1.20.4 works fine.
Log 1.20.1
Minecraft Console Client v1.20.4 - for MC 1.4.6 to 1.20.4 - Github.com/MCCTeam [MCC] [ScriptScheduler] Loaded task: triggeronfirstlogin: False triggeronlogin: False triggerontime: True triggeroninterval: True timevalue: 14:00:00 timeinterval: 53.4 action: send /hello [MCC] [ScriptScheduler] Loaded task: triggeronfirstlogin: False triggeronlogin: True triggerontime: False triggeroninterval: False timevalue: timeinterval: 56 action: send /login pass Color test: Your terminal should display [0123456789ABCDEF]: (4bit)[0123456789ABCDEF] Color test: Your terminal should display [0123456789]: (vt100 8bit)[0123456789] Color test: Your terminal should display [0123456789]: (vt100 24bit)[0123456789] [SessionCache] Initializing FileSystemWatcher for file: D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\bin\Debug\net7.0\SessionCache.ini Loading session cache from disk: SessionCache.ini Loaded session: Loaded session: Session data has been successfully loaded from disk. Access token expiration time is 2024/3/15 23:39:50 Cached session is still valid for oldkingOK. Saving session cache to disk Success. (session ID: Retrieving Server Info... Performing request to sessionserver.mojang.com Loading session cache from disk: SessionCache.ini Loaded session: Server version : 1.20.1 (protocol v763) [KeysCache] Initializing FileSystemWatcher for file: D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\bin\Debug\net7.0\ProfileKeyCache.ini Loading profile key cache from disk: ProfileKeyCache.ini Loaded profile key, it will be refresh at 2024/3/16 8:36:39 Loaded profile key, it will be refresh at 2024/3/16 15:39:52 Profile keys has been successfully loaded from disk. Cached profile key is still valid for oldkingOK. [MCC] Version is supported. Logging in... [DEBUG] Crypto keys & hash generated. [MCC] Checking Session... Performing request to sessionserver.mojang.com Saving session cache to disk Loading session cache from disk: SessionCache.ini Loaded session: So [MCC] Server was successfully joined. Type '/quit' to leave the server. > Unhandled exception. System.IO.InvalidDataException: Failed to process incoming packet of type ProfilelessChatMessage. (PacketID: 28, Protocol: 763, LoginPhase: False, InnerException: System.InvalidOperationException). ---> System.InvalidOperationException: Queue empty. at System.Collections.Generic.Queue`1.ThrowForEmptyQueue() at System.Collections.Generic.Queue`1.Dequeue() at MinecraftClient.Protocol.Handlers.DataTypes.ReadNextChat(Queue`1 cache) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\DataTypes.cs:line 1068 at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePlayPackets(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 1051 at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 447 --- End of inner exception stack trace --- at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePacket(Int32 packetId, Queue`1 packetData) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 459 at MinecraftClient.Protocol.Handlers.Protocol18Handler.Updater(Object o) in D:\Documents\VSCode\Minecraft-Console-Client\MinecraftClient\Protocol\Handlers\Protocol18.cs:line 253 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)
Can you send me the message that is causing this? Do you run a pure vanilla server or a PaperMc server with/without plugins?
Hi, @milutinke ,
Can you send me the message that is causing this?
I didn't send any message before the crash.
It crashed right after Type '/quit' to leave the server.
Do you run a pure vanilla server or a PaperMc server with/without plugins?
Yes, I run a pure vanilla server with jar file from https://getbukkit.org/download/vanilla
Latest
Windows x64
Hi, @milutinke ,
Can you send me the message that is causing this?
I didn't send any message before the crash. It crashed right after
Type '/quit' to leave the server.
Do you run a pure vanilla server or a PaperMc server with/without plugins?
Yes, I run a pure vanilla server with jar file from https://getbukkit.org/download/vanilla
Additional Information
Console Client Version
Latest
Operating System
Windows x64
I will debug it tomorrow, thanks for the link for the Vanilla jar.
Hi, @milutinke ,
It seems that the packet id wasn't correctly recognized.
In 1.20.2, https://wiki.vg/index.php?title=Protocol&oldid=18641#Disguised_Chat_Message
The Disguised_Chat_Message (alias in MCC: ProfilelessChatMessage) packet id is 0x1C -> 28
In 1.20.1, https://wiki.vg/index.php?title=Protocol&oldid=18375#Disguised_Chat_Message
The packet id is 0x1B -> 27
In the 1.20.1 log
Unhandled exception. System.IO.InvalidDataException: Failed to process incoming packet of type ProfilelessChatMessage. (PacketID: 28, Protocol: 763, LoginPhase: False, InnerException: System.InvalidOperationException).
It looks like there's something wrong with the GetTypeHandler(int protocol)
PacketTypePalette p = protocol switch
{
> Protocol18Handler.MC_1_20_4_Version => throw new NotImplementedException(Translations
.exception_palette_packet),
<= Protocol18Handler.MC_1_8_Version => new PacketPalette17(),
...
<= Protocol18Handler.MC_1_19_2_Version => new PacketPalette1192(),
<= Protocol18Handler.MC_1_19_3_Version => new PacketPalette1193(),
<= Protocol18Handler.MC_1_19_4_Version => new PacketPalette1194(),
<= Protocol18Handler.MC_1_20_2_Version => new PacketPalette1202(),
_ => new PacketPalette1204()
};
MC_1_19_4_Version = 762 MC_1_20_Version = 763 (includes 1.20 and 1.20.1) MC_1_20_2_Version = 764
Tested, MCC works fine with Palette1194 and protocol763 while using Palette1202 causes the crash.
Can we replace this line
- <= Protocol18Handler.MC_1_19_4_Version => new PacketPalette1194(),
+ <= Protocol18Handler.MC_1_20_1_Version => new PacketPalette1194(),
?
Clientbound protocols of 1.19.4 match with 1.20 and 1.20.1. Only 1.20.2 has new clientbound protocols which then will be catched by the next line. I will proof it and make a pull request if it works.
Okay, so it works (at least for 1.20.1) if you choose the PacketPalette1194
for it like described above. But you still need to add MC_1_20_1_Version
in Protocol18.cs like so:
// . . .
internal const int MC_1_20_Version = 763;
+ internal const int MC_1_20_1_Version = 763;
internal const int MC_1_20_2_Version = 764;
// . . .
Notice how it has the same version as 1.20. For now all 1.20.x will use 1.20.4 version which is not right.
I don't want to push it or make a pull request at this point because I have the feeling there might be more to do I can't know at this point because I am new to this project. Can a dev proof this or explain what else I have to consider when making these changes?
Hi @imnaK ,
Can we replace this line
- <= Protocol18Handler.MC_1_19_4_Version => new PacketPalette1194(), + <= Protocol18Handler.MC_1_20_1_Version => new PacketPalette1194(),
I think
<= Protocol18Handler.MC_1_20_Version => new PacketPalette1194(),
is fine, because Protocol18Handler.MC_1_20_Version
whose value is 763 includes 1.20 and 1.20.1.
There is no need to add a new const MC_1_20_1_Version
.
Hey @oldkingOK,
I think
<= Protocol18Handler.MC_1_20_Version => new PacketPalette1194(),
is fine, because
Protocol18Handler.MC_1_20_Version
whose value is 763 includes 1.20 and 1.20.1.There is no need to add a new const
MC_1_20_1_Version
.
Makes sense :) I have noticed that but did not think of that because of the naming.
Finally caught some free time to read up on this. Nice catch and work guys, thanks for contributing.
Prerequisites
debugmessages=true
in config to diagnose my issueMinecraft Version
1.19.4
Console Client Version
Latest
Expected Behavior
Joining a server normally does not pop up an error
Actual Behavior
The following error message is displayed: Unhandled exception. System.IO.InvalidDataException: 无法处理传入的ProfilelessChatMessage类型的数据包。(数据包ID:28,协议:763,登陆阶段:False,内部异常:System.InvalidOperationException)。 ---> System.InvalidOperationException: Queue empty. at System.Collections.Generic.Queue
1.ThrowForEmptyQueue() at System.Collections.Generic.Queue
1.Dequeue() at MinecraftClient.Protocol.Handlers.DataTypes.ReadNextChat(Queue1 cache) at MinecraftClient.Protocol.Handlers.Protocol18Handler.HandlePlayPackets(Int32 packetId, Queue
1 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)Steps to Reproduce the bug
Attach screenshot here (If applicable)
Anythings that could help diagnosing the bug
Device
Desktop
Operating System
Windows
Server Address (If applicable)
2b2t.xin