jabbink / PokemonGoBot

DEFUNCT - Bot that plays Pokemon Go
https://www.pogobot.club/
GNU General Public License v3.0
559 stars 232 forks source link

Exception in thread "main" java.lang.NullPointerException #16

Closed jst94 closed 8 years ago

jst94 commented 8 years ago

Exception in thread "main" java.lang.NullPointerException at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838) at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) at java.lang.Double.parseDouble(Double.java:538) at ink.abb.pogo.scraper.MainKt.main(Main.kt:93)

When using java -jar

jabbink commented 8 years ago

Did you do the thing with the config file as instructed?

CptJackieSparrow commented 8 years ago

I have the exactly same problem which i write down under reddit post. It works fine for 15-16 threads, then this thing starts to occure. And my config is just fine.

jabbink commented 8 years ago

Is it literally the same error (error contains "readJavaFormatString") or is it more like the error of #13?

CptJackieSparrow commented 8 years ago

I'll have a look. UPDATE: It's not even logging in now. UPDATE2: This error now "Exception in thread "main" com.pokegoapi.exceptions.LoginHailedException at com.pokegoapi.auth.PTCLogin.login(PTCLogin.java:169) at ink.abb.pogo.scraper.MainKt.Main(Main.kt:95)

jst94 commented 8 years ago

Yeah my config file is good as it seems

jabbink commented 8 years ago

Is your config file located next to the .jar and can you paste the contents of your config.properties?

@CptJackieSparrow I assume you had a different error, the same from #13, please re-download the jar from the releases here on GitHub.

CptJackieSparrow commented 8 years ago

Yeah they are next to each other

PTC Login credentials

username=[My Username] password=[My Password] latitude=40.763704 longitude=-73.973522 prefered_ball=ITEM_POKE_BALL

jst94 commented 8 years ago

Works now. Used another text editor to make the properties. Now getting this: Exception in thread "main" com.pokegoapi.exceptions.LoginFailedException at com.pokegoapi.auth.PTCLogin.login(PTCLogin.java:169) at ink.abb.pogo.scraper.MainKt.main(Main.kt:89)

jabbink commented 8 years ago

@CptJackieSparrow seems like it should work for you and you did not get the same error as @jst94; just keep on botting :+1:

@jst94 your username/password are not correct for pokemon.com

jst94 commented 8 years ago

@jabbink Yeah they work :( just checked on the website

CptJackieSparrow commented 8 years ago

Thank you for your cooperation mate! Well i can't continue botting as I'm having another error eachtime i open the bot :D Now it turned Main.kt:189, Main.kt:118 errors.

NVM, i assume u fixed it, latest JAR files does the work :)

tomtobac commented 8 years ago
Exception in thread "Thread-192" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at com.pokegoapi.main.RequestHandler.sendServerRequests(RequestHandler.java:104)
    at com.pokegoapi.api.map.Map.getMapObjects(Map.java:170)
    at com.pokegoapi.api.map.Map.getMapObjects(Map.java:147)
    at com.pokegoapi.api.map.Map.getMapObjects(Map.java:93)
    at ink.abb.pogo.scraper.MainKt$main$$inlined$fixedRateTimer$lambda$lambda$1.invoke(Main.kt:124)
    at ink.abb.pogo.scraper.MainKt$main$$inlined$fixedRateTimer$lambda$lambda$1.invoke(Main.kt)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:18)

I will let this here. It crashed but keep working. Awesome bot, the best I found, really! :+1:

jabbink commented 8 years ago

That's a bug related to the Java API not being compatible in a multithreaded setting. Shouldn't make the app crash and it should just continue working afterwards. Also the original issue is related to having an incorrect config.properties file, so I'll close this.