MrKinau / FishingBot

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

error connecting to server #16

Closed reefer closed 4 years ago

reefer commented 4 years ago

I believe the issue is the server has a queue system that makes you wait about 5 - 10 seconds to be connected, i read in a another error that it might be fixable by disabling fishingrod check how could i do that?

[2019-11-11 10:04:58] [INFO ] fantasy.vanitymc.co [2019-11-11 10:04:58] [INFO ] Module "FishingModule" enabled! [2019-11-11 10:04:58] [INFO ] Module "HandshakeModule" enabled! [2019-11-11 10:04:58] [INFO ] Module "LoginModule" enabled! [2019-11-11 10:04:58] [INFO ] Module "ChatCommandModule" enabled! [2019-11-11 10:04:58] [INFO ] Module "ClientDefaultsModule" enabled! [2019-11-11 10:04:59] [SEVERE ] Error while trying to send: PacketOutPosition [2019-11-11 10:05:00] [SEVERE ] Error while trying to send: PacketOutPosition 512 [2019-11-11 10:05:00] [INFO ] Login successful! [2019-11-11 10:05:00] [INFO ] Name: FgtEric [2019-11-11 10:05:00] [INFO ] UUID: d63e675a-d0d1-40fb-bd8e-fcb373f93b88 [2019-11-11 10:05:00] [SEVERE ] No fishing rod equipped. Retrying later! [2019-11-11 10:05:00] [SEVERE ] No fishing rod equipped. Retrying later! [2019-11-11 10:05:00] [SEVERE ] No fishing rod equipped. Retrying later! [2019-11-11 10:05:01] [SEVERE ] Error while trying to send: PacketOutPosition Exception in thread "Thread-13" com.github.kevinsawicki.http.HttpRequest$HttpRequestException: java.net.MalformedURLException: no protocol: true at com.github.kevinsawicki.http.HttpRequest.(HttpRequest.java:1475) at com.github.kevinsawicki.http.HttpRequest.post(HttpRequest.java:1044) at com.mrpowergamerbr.temmiewebhook.TemmieWebhook$1.run(TemmieWebhook.java:24) at java.lang.Thread.run(Unknown Source) Caused by: java.net.MalformedURLException: no protocol: true at java.net.URL.(Unknown Source) at java.net.URL.(Unknown Source) at java.net.URL.(Unknown Source) at com.github.kevinsawicki.http.HttpRequest.(HttpRequest.java:1473) ... 3 more [2019-11-11 10:05:01] [INFO ] Starting fishing! java.lang.RuntimeException: VarInt too big at systems.kinau.fishingbot.network.protocol.Packet.readVarInt(Packet.java:203) at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:366) at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:218) at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:144) at systems.kinau.fishingbot.Main.main(Main.java:12) [2019-11-11 10:05:02] [WARNING] Could not receive packet! Shutting down! [2019-11-11 10:05:02] [INFO ] FishingBot restarts in 10 seconds... [2019-11-11 10:05:02] [SEVERE ] Error while trying to send: PacketOutArmAnimation [2019-11-11 10:05:02] [SEVERE ] Error while trying to send: PacketOutPosition Exception in thread "Thread-10" java.lang.NullPointerException at systems.kinau.fishingbot.FishingBot.lambda$connect$0(FishingBot.java:210) at java.lang.Thread.run(Unknown Source) Exception in thread "Thread-3" java.lang.NullPointerException at systems.kinau.fishingbot.FishingBot.lambda$connect$0(FishingBot.java:210) at java.lang.Thread.run(Unknown Source)

MrKinau commented 4 years ago

Thanks for your issue, will take a closer look. in a few hours

MrKinau commented 4 years ago

Exception in thread "Thread-13" com.github.kevinsawicki.http.HttpRequest$HttpRequestException: java.net.MalformedURLException: no protocol: true at com.github.kevinsawicki.http.HttpRequest.(HttpRequest.java:1475) at com.github.kevinsawicki.http.HttpRequest.post(HttpRequest.java:1044) at com.mrpowergamerbr.temmiewebhook.TemmieWebhook$1.run(TemmieWebhook.java:24) at java.lang.Thread.run(Unknown Source) Caused by: java.net.MalformedURLException: no protocol: true at java.net.URL.(Unknown Source) at java.net.URL.(Unknown Source) at java.net.URL.(Unknown Source) at com.github.kevinsawicki.http.HttpRequest.(HttpRequest.java:1473) ... 3 more

this is, because you have an error in the config file: to use the discord support you have to specify the webhook there instead of writing true. Tutorial, how to create one.

java.lang.RuntimeException: VarInt too big at systems.kinau.fishingbot.network.protocol.Packet.readVarInt(Packet.java:203) at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:366) at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:218) at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:144) at systems.kinau.fishingbot.Main.main(Main.java:12)

Then it cant read incoming packets. Well this should not happen. Maybe if you disable or enable the discord support correctly it might work. I will try it out and look what is the problem. Maybe I have to change some code for it, because of the queue.

I removed the fishing rod check and replaced it only with a warning in the console. This wont let the bot stop working.

reefer commented 4 years ago

with the fixed discord webhooks it still cant read incoming packets because of the queue im assuming

MrKinau commented 4 years ago

sorry, atm I am not able to test it myself. Can you send the log, after setting packet-log=true in the config?

reefer commented 4 years ago

https://ghostbin.co/paste/fok43 here is the log from start to end

at the end of the log i use a keyboard interrupt causing the bottom error.

i believe the error is here other offsets are 0x* this one is 0x:

[2019-11-11 14:35:21] [INFO ] [PLAY] C <<< S: 0x3 java.lang.RuntimeException: VarInt too big at systems.kinau.fishingbot.network.protocol.Packet.readVarInt(Packet.java:203) at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:366) at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:218) at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:144) at systems.kinau.fishingbot.Main.main(Main.java:12)

and also no rush brother anything else you want me to test ?

MrKinau commented 4 years ago

Well thats pretty awkward, could test it on my own and everything works fine. I see you still have a configuration issue:

announce-type-chat=none or announce-type-console=none

are not valid. Announce types have to be ALL UPPERCASE

announce-type-chat=NONE or announce-type-console=NONE

Maybe this is your solution?

MrKinau commented 4 years ago

Oh you just interrupted? Then I dont understand what your problem is?

reefer commented 4 years ago

fixed the configuration issue and still getting the issue, cannot connect to the server its stuck looping

visual example of issue ( continuous loop without server connection): https://gfycat.com/inconsequentialrewardingbear

new log: https://ghostbin.co/paste/y9njz

i believe its something to do with the queue messing up the length within the packet there's something on the server setting the int longer than 16 characters causing it to error out and yes i interrupted.

maybe can be solved by adding a option in configuration to sleep etc amount of seconds before beginning to fish

MrKinau commented 4 years ago

Can you send me your config? (please censor your login data) I still cant reproduce it. Everything works fine for me :/

reefer commented 4 years ago

i converted the config from properties file to .txt to upload within github

config.txt

MrKinau commented 4 years ago

Well this is my config and it worked.

https://gist.github.com/MrKinau/b54fbb33964b4a77683d1c1768d484b3

reefer commented 4 years ago

your config fixed the issue, is there a way to execute commands within this like /fix hand

MrKinau commented 4 years ago

You can enable start-text and execute commands with it seperated with semicolon

reefer commented 4 years ago

Amazing, you are a beautiful man, have yourself a good day brother.