MrKinau / FishingBot

1.8 - 1.20.6 Fishing bot for Minecraft
GNU General Public License v3.0
321 stars 67 forks source link

Error when connecting to Paper1.20 server using 2.10.7 #204

Closed ENTNEAZ closed 1 year ago

ENTNEAZ commented 1 year ago

I'm trying to connect 1.20 server(Paper 1.20) using 2.10.7 After successfully entered the server, it reported an error in a very short time

this is what is reported

[2023-06-11 11:58:54] [INFO   ] Received pong: OW-1.20-Pre, version: 1.20 (763), players online: 13 
[2023-06-11 11:58:54] [INFO   ] Obtained the required keys for chat signing! 
[2023-06-11 11:58:54] [INFO   ] Module "HandshakeModule" enabled! 
[2023-06-11 11:58:54] [INFO   ] Module "LoginModule" enabled! 
[2023-06-11 11:58:54] [INFO   ] Module "ClientDefaultsModule" enabled! 
[2023-06-11 11:58:54] [INFO   ] Module "FishingModule" enabled! 
[2023-06-11 11:58:54] [INFO   ] Module "ChatProxyModule" enabled! 
[2023-06-11 11:58:54] [INFO   ] Module "ChatCommandModule" enabled! 
[2023-06-11 11:58:56] [INFO   ] Login successful! 
[2023-06-11 11:58:56] [INFO   ] Name: Myname
[2023-06-11 11:58:56] [INFO   ] UUID: correct uuid
[2023-06-11 11:58:56] [INFO   ] [CHAT] (login info from chat)
[2023-06-11 11:58:56] [INFO   ] systems.kinau.fishingbot.network.utils.OverflowPacketException: Cannot receive string longer than Short.MAX_VALUE (got 80831725 characters) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.network.protocol.Packet.readString(Packet.java:49) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.network.protocol.play.PacketInPlayerListItem$Action.lambda$static$0(PacketInPlayerListItem.java:106) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.network.protocol.play.PacketInPlayerListItem.read(PacketInPlayerListItem.java:90) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.network.protocol.NetworkHandler.readPacket(NetworkHandler.java:891) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.network.protocol.NetworkHandler.readCompressed(NetworkHandler.java:856) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:813) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.Bot.connect(Bot.java:395) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.Bot.start(Bot.java:280) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.FishingBot.startBot(FishingBot.java:97) 
[2023-06-11 11:58:56] [INFO   ]     at systems.kinau.fishingbot.Main.main(Main.java:63) 
[2023-06-11 11:58:56] [WARNING] Could not receive packet! Shutting down... 
[2023-06-11 11:58:56] [INFO   ] Module "LoginModule" disabled! 
[2023-06-11 11:58:56] [INFO   ] Module "ClientDefaultsModule" disabled! 
[2023-06-11 11:58:56] [INFO   ] Module "FishingModule" disabled! 
[2023-06-11 11:58:56] [INFO   ] Module "ChatProxyModule" disabled! 
[2023-06-11 11:58:56] [INFO   ] Module "ChatCommandModule" disabled! 
[2023-06-11 11:58:56] [INFO   ] FishingBot will reconnect in 5 seconds... 
Exception in thread "Thread-3" [2023-06-11 11:58:57] [INFO   ] java.util.concurrent.RejectedExecutionException: Task systems.kinau.fishingbot.Bot$$Lambda$133/0x0000000840214440@467b4b41 rejected from java.util.concurrent.ThreadPoolExecutor@368ee277[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] 
[2023-06-11 11:58:57] [INFO   ]     at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2055) 
[2023-06-11 11:58:57] [INFO   ]     at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:825) 
[2023-06-11 11:58:57] [INFO   ]     at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1355) 
[2023-06-11 11:58:57] [INFO   ]     at java.base/java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:687) 
[2023-06-11 11:58:57] [INFO   ]     at systems.kinau.fishingbot.Bot.runCommand(Bot.java:284) 
[2023-06-11 11:58:57] [INFO   ]     at systems.kinau.fishingbot.modules.ClientDefaultsModule.lambda$null$0(ClientDefaultsModule.java:59) 
[2023-06-11 11:58:57] [INFO   ]     at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) 
[2023-06-11 11:58:57] [INFO   ]     at systems.kinau.fishingbot.modules.ClientDefaultsModule.lambda$onSetDifficulty$1(ClientDefaultsModule.java:58) 
[2023-06-11 11:58:57] [INFO   ]     at java.base/java.lang.Thread.run(Thread.java:829) 
Exception in thread "Thread-4" [2023-06-11 11:58:57] [INFO   ] java.lang.NullPointerException 
[2023-06-11 11:58:57] [INFO   ]     at systems.kinau.fishingbot.modules.fishing.FishingModule.lambda$onSetDifficulty$7(FishingModule.java:293) 
[2023-06-11 11:58:57] [INFO   ]     at java.base/java.lang.Thread.run(Thread.java:829) 
MrKinau commented 1 year ago

This seems to be an issue with the TablistPacket, I've only tested with a simple tablist, I'll take a look on it

MrKinau commented 1 year ago

hopefully fixed in https://github.com/MrKinau/FishingBot/releases/tag/v2.10.8 (can't reproduce the issue, but fixed some part of the code, which may be the error (the UPDATE_DISPLAY_NAME which seem to have no use in vanilla was not implemented correctly)) Please leave a comment if it does not fix your issue

ENTNEAZ commented 1 year ago

Completely fixed! Your guess is right, it does have some Chinese characters in the TAB Name list. Thank you!