PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

Exception in thread "main" java.lang.NullPointerException

Open jst94 opened this issue 10 years ago • 13 comments

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

jst94 avatar Jul 21 '16 13:07 jst94

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

jabbink avatar Jul 21 '16 13:07 jabbink

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.

CptJackieSparrow avatar Jul 21 '16 13:07 CptJackieSparrow

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

jabbink avatar Jul 21 '16 13:07 jabbink

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)

CptJackieSparrow avatar Jul 21 '16 13:07 CptJackieSparrow

Yeah my config file is good as it seems

jst94 avatar Jul 21 '16 13:07 jst94

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.

jabbink avatar Jul 21 '16 13:07 jabbink

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

CptJackieSparrow avatar Jul 21 '16 13:07 CptJackieSparrow

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)

jst94 avatar Jul 21 '16 13:07 jst94

@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

jabbink avatar Jul 21 '16 13:07 jabbink

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

jst94 avatar Jul 21 '16 13:07 jst94

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 :)

CptJackieSparrow avatar Jul 21 '16 13:07 CptJackieSparrow

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:

tomtobac avatar Jul 21 '16 14:07 tomtobac

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.

jabbink avatar Jul 21 '16 16:07 jabbink