MrKinau / FishingBot

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

EOFException #70

Closed Couldosh closed 4 years ago

Couldosh commented 4 years ago

Hey ! I used the bot yesterday and everything worked well. But now I got an EOFException:

` C:\Users\callo\Documents\MrFish> java -jar .\FishingBot-2.7.4.jar

[2020-09-01 03:32:09] [INFO ] Authentication successful! [2020-09-01 03:32:09] [INFO ] Pinging [SERVERIP] with protocol of MC-1.16.1 [2020-09-01 03:32:09] [INFO ] Received pong: Unknown, Version: 1.16.1, online: 2 [2020-09-01 03:32:09] [INFO ] Module "FishingModule" enabled! [2020-09-01 03:32:09] [INFO ] Module "HandshakeModule" enabled! [2020-09-01 03:32:09] [INFO ] Module "LoginModule" enabled! [2020-09-01 03:32:09] [INFO ] Module "ChatCommandModule" enabled! [2020-09-01 03:32:09] [INFO ] Module "ClientDefaultsModule" enabled! [2020-09-01 03:32:10] [INFO ] Login successful! [2020-09-01 03:32:10] [INFO ] Name: [NAME] [2020-09-01 03:32:10] [INFO ] UUID: d8fd2ade-da74-4438-afb8-70e2a1371d07 java.lang.IllegalStateException: java.io.EOFException at com.google.common.io.ByteStreams$ByteArrayDataInputStream.readFully(ByteStreams.java:277) at systems.kinau.fishingbot.network.utils.ByteArrayDataInputWrapper.readFully(ByteArrayDataInputWrapper.java:40) at systems.kinau.fishingbot.network.utils.ByteArrayDataInputWrapper.readBytes(ByteArrayDataInputWrapper.java:140) at systems.kinau.fishingbot.network.protocol.Packet.readString(Packet.java:41) at systems.kinau.fishingbot.network.protocol.play.PacketInJoinGame.read(PacketInJoinGame.java:114) at systems.kinau.fishingbot.network.protocol.NetworkHandler.readPacket(NetworkHandler.java:562) at systems.kinau.fishingbot.network.protocol.NetworkHandler.readCompressed(NetworkHandler.java:530) at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:487) at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:220) at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:153) at systems.kinau.fishingbot.Main.main(Main.java:12) Caused by: java.io.EOFException at java.base/java.io.DataInputStream.readFully(DataInputStream.java:201) at com.google.common.io.ByteStreams$ByteArrayDataInputStream.readFully(ByteStreams.java:275) ... 10 more [2020-09-01 03:32:10] [WARNING] Could not receive packet! Shutting down! [2020-09-01 03:32:10] [INFO ] Module "ClientDefaultsModule" disabled! [2020-09-01 03:32:10] [INFO ] Module "FishingModule" disabled! [2020-09-01 03:32:10] [INFO ] FishingBot restarts in 3 seconds... [2020-09-01 03:32:13] [INFO ] Module "FishingModule" enabled! [2020-09-01 03:32:13] [INFO ] Module "HandshakeModule" enabled! [2020-09-01 03:32:13] [INFO ] Module "LoginModule" enabled! [2020-09-01 03:32:13] [INFO ] Module "ChatCommandModule" enabled! [2020-09-01 03:32:13] [INFO ] Module "ClientDefaultsModule" enabled! [2020-09-01 03:32:13] [SEVERE ] Login failed: {"translate":"Connection saturated! Wait a bit and try again."} [2020-09-01 03:32:13] [INFO ] Module "ClientDefaultsModule" disabled! [2020-09-01 03:32:13] [INFO ] Module "FishingModule" disabled! [2020-09-01 03:32:13] [INFO ] FishingBot restarts in 3 seconds...`

At the end, it keeps restarting and saying the connection is saturated. Do you know where the problem come from? I thought Mojang banned my IP address but I tried to change it with a VPN, and it didn't work.

MrKinau commented 4 years ago

Well, thanks for your report. It was just a matter of time this will happen. With the 1.16.2 support there was no information out about the world-count in the JoinGamePacket. The quick and dirty workaround seems to not work correctly. Or just does not work with 1.16.1 (https://github.com/MrKinau/FishingBot/issues/67#issuecomment-674292774)

You can try using an older version (https://github.com/MrKinau/FishingBot/releases/tag/2.7.3) for 1.16.1 this may work, but I will work on a fix of this, the new portocol should be documented.

For easy testing on a fix: Which server software is the server running (Spigot?, Vanilla?, +BungeeCord?, ...)? Is there anything special about the worlds configured (different world count?, using cool new 1.16-world-gen-features?)

MrKinau commented 4 years ago

should be fixed for now in the latest release 2.7.4 If you are still having issues feel free to reopen or create a new issue :)