jabbink / PokemonGoBot

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

NoSuchMethodError on okio.BufferedSource.select(Lokio/Options) using PTC Accounts #1207

Closed ghost closed 8 years ago

ghost commented 8 years ago

Description: When attempting to log in using a PTC account using the latest Dev build from both the Java API as well as this bot, a NoSuchMethodError is being thrown. Possibly due to a version mismatch of okio when google maps services was introduced (Bot version vs Java API version)?

Commit confirmed working: https://github.com/jabbink/PokemonGoBot/commit/0de4f085e284ec63be6e2540da4af5ad2e9adfeb

Commit I noticed it broken on (Wasn't this commit, but it is my most recent build): https://github.com/jabbink/PokemonGoBot/commit/d0e0031edaf7e01bbf087ea21df51228930a7a7c

Steps to reproduce:

  1. Perform the latest Dev build of both.
  2. Start the bot using a PTC Account

Expected behavior: You are able to log in.

Actual behavior: NoSuchMethodError is thrown.

Stacktrace (If it's a crash):

←[37m21 Aug 21:59:22 [default] - Logging in to game server... ←[0;39mException in thread "default" java.lang.NoSuchMethodError: okio.BufferedSource.select(Lokio/Options;)I at com.squareup.moshi.BufferedSourceJsonReader.selectName(BufferedSourceJsonReader.java:564) at com.squareup.moshi.ClassJsonAdapter.fromJson(ClassJsonAdapter.java:147) at com.squareup.moshi.JsonAdapter$1.fromJson(JsonAdapter.java:68) at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:33) at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:37) at com.pokegoapi.auth.PtcCredentialProvider.login(PtcCredentialProvider.java:157) at com.pokegoapi.auth.PtcCredentialProvider.(PtcCredentialProvider.java:111) at ink.abb.pogo.scraper.MainKt.getAuth(Main.kt:72) at ink.abb.pogo.scraper.MainKt.startBot(Main.kt:194) at ink.abb.pogo.scraper.MainKt.startBot$default(Main.kt:157) at ink.abb.pogo.scraper.services.BotService.submitBot(BotService.kt:42) at ink.abb.pogo.scraper.PokemonGoBotApplication$BotRunner$run$$inlined$forEach$lambda$1.invoke(PokemonGoBotApplication.kt:85) at ink.abb.pogo.scraper.PokemonGoBotApplication$BotRunner$run$$inlined$forEach$lambda$1.invoke(PokemonGoBotApplication.kt:67) at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:18)

Operating System: Windows 7

Java version: 1.8.0_74

Leave this sentence in your issue as proof that you have read and used this template.

FrancYescO commented 8 years ago

so you are simply saying that is impossible to login with PTC with latest develop?

not for me.

ghost commented 8 years ago

I had changed the compile dependency for the PokeGOAPI to a locally build jar file. I haven't tested it using whatever the current snapshot build is in the repository. This might not be an issue for everyone yet, but it might be when the snapshot updates. I was able to log into a PTC account using a small tool made locally.

Sieberkev commented 8 years ago

I noticed a new snapshot download from the API 2 hours ago,does it work now?

ghost commented 8 years ago

I can test it later today or tomorrow. Had some accounts banned in the latest wave.

On Aug 22, 2016 6:17 PM, "Sieberkev" notifications@github.com wrote:

I noticed a new snapshot download from the API 2 hours ago,does it work now?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jabbink/PokemonGoBot/issues/1207#issuecomment-241568566, or mute the thread https://github.com/notifications/unsubscribe-auth/ADI9kKK37xRbrb5colOPtaFqSmlDSoRDks5qih_mgaJpZM4JpdI4 .

Sieberkev commented 8 years ago

Did anything come up? No other users reported a related problem.

ghost commented 8 years ago

Haven't had the time to check due to work. Will close this Issue and reopen if I encounter it again. I trust the masses :)