PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

Summary: Changes to Pokemon API

Open HoneyWheat opened this issue 10 years ago • 89 comments

Hi, as you noticed the bot is not working at the moment. This is related to chenges deployed by Niantic on July, 28th. This relates to all versions of the bot (currently 0.4.3 & 0.5.0a). Many users reports and open issues for this, so there is a flood of issues relating to the same problem. The problems by names are:

  • Server returned unexpected error
  • com.pokegoapi.exceptions.RemoteServerException
  • com.google.protobuf.InvalidProtocolBufferException
  • GoogleCredentialProvider: Get user to go to:null and enter code:null

I tried to put together a list of the issues regarding the API: #621, #608, #606, #617, #616, #613, #612, #611, #603, #596

Please give the developers time to look into the problem and do not open new issues to this problem.

Hope this helps to bring things together.

HoneyWheat avatar Jul 29 '16 06:07 HoneyWheat

Patience everyone. It's surprising how demanding people are here when everything is open-source and free, give them time.

Mewks avatar Jul 29 '16 06:07 Mewks

I'm getting this:

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/pokegoapi/exceptions/LoginFailedException : Unsupported major.minor version 51.0

Seems likely to me that this may tie in to this same problem, I also didn't see this specific line in any of the issues you're referencing.

Experienced this on a fresh 0.4.3, using PTC credentials (actually: registered a fresh account to try this as I'm afraid of getting my original account banned).

Hope this helps in any way...

joepeding avatar Jul 29 '16 06:07 joepeding

@Ima-Pseudonym Update your Java. @HoneyWheat Thanks for the summary. Pretty sure all of those can be fixed mostly with the newer library versions. I'll look into it.

langerhans avatar Jul 29 '16 07:07 langerhans

i've update my java version but the issue is still the same.


com.pokegoapi.exceptions.RemoteServerException: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null at com.pokegoapi.api.map.Map.getMapObjects(Map.java:307) at com.pokegoapi.api.map.Map.getMapObjects(Map.java:270) at com.pokegoapi.api.map.Map.getMapObjects(Map.java:205) at com.pokegoapi.api.map.Map.getMapObjects(Map.java:195) at com.pokegoapi.api.map.Map.getCatchablePokemon(Map.java:103) at ink.abb.pogo.scraper.util.map.MapKt.getCatchablePokemon(Map.kt:15) at ink.abb.pogo.scraper.tasks.Walk$walk$1.invoke(Walk.kt:82) at ink.abb.pogo.scraper.tasks.Walk$walk$1.invoke(Walk.kt:21) at ink.abb.pogo.scraper.Bot$runLoop$1.invoke(Bot.kt:139) at ink.abb.pogo.scraper.Bot$runLoop$1.invoke(Bot.kt:32) at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:18) Caused by: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null at com.pokegoapi.main.ServerRequest.getData(ServerRequest.java:66) at com.pokegoapi.api.map.Map.getMapObjects(Map.java:305) ... 10 more

ghost avatar Jul 29 '16 07:07 ghost

Did you even read that the first post in this issue said? smh

langerhans avatar Jul 29 '16 07:07 langerhans

@Samoth1980 The latest server patch has not been fixed, please be patient and check again when it has been fixed.

ghost avatar Jul 29 '16 07:07 ghost

@langerhans i've only added some log and i know the status, and yes i've read the post. @Emuuung yes i know thanks for all the works.

ghost avatar Jul 29 '16 07:07 ghost

Grover-c13 has just implemented a fix for the latest server patch, it's #335. He says it's still messy but someone wanna give it a shot?

ghost avatar Jul 29 '16 08:07 ghost

UPDATE: Using the rate limiting workaround below this no longer happens and works fine.. Ignore this, the root cause is some rate limiting on the api side.

There is 1 additional bug but I think a recent commit actually caused that....

If your using PTC username and password it tries to use a google auth token login and not PTC from what I can tell..

29 Jul 02:42:08: Logging in to game server... D/RequestHandler: Authenticated with static token D/RequestHandler: Authenticated with static token 29 Jul 02:42:09: Server returned unexpected error

Of course this might be related to the root cause but I wanted to put this out there so when they are testing api fixes, they know to try a ptc account as well.

accident12123 avatar Jul 29 '16 08:07 accident12123

my bot is running with the google account login. he ran for about 2 days now and still goes on. sometimes he disconnect and there are many problems on the cmd but after some tries or hours, he reconnect and everythings fine. actually ep get 825000. thats awesome, best bot ive ever seen. just go on guys. i love ur work and thank u for the bot.

Smashtray avatar Jul 29 '16 08:07 Smashtray

As a temporary workaround I traffic shaped the freebsd jail running the 0.5.0 p2 bot using HFSC with pf. Settings are m1=0, d=300ms, m2=256Kb. Bot is up and running since a while without any issues.

For more help on HFSC, see https://calomel.org/pf_hfsc.html

29 Jul 10:33:22: Found pokemon ZUBAT 29 Jul 10:33:22: Encountered pokemon ZUBAT with CP 147 and IV 24% 29 Jul 10:33:22: Using desired_catch_probability_unwanted because CP < 400 and IV < 80% 29 Jul 10:33:22: Using ITEM_GREAT_BALL; achieved catch probability: 0.6178314, desired: 0.0 29 Jul 10:33:23: Caught a ZUBAT with CP 147 and IV 24% Stamina: 3 | Attack: 7 | Defense: 1 | IV: 11 (24%): [200x XP, 3x Candy, 100x Stardust] 29 Jul 10:33:23: Going to transfer ZUBAT with CP 147 and IV 24%; reason: CP < 400 and IV < 80%

edit 1 I tweaked up m2 from 33Kb to 256Kb, to allow the gmaps to download more quickly.

pahi avatar Jul 29 '16 08:07 pahi

I have a similar problem on very account. Google and Trainer. They logs in but the script stops immediately.

29 lug 11:04:20: Have VULPIX () with 71 CP and IV 24% Stamina: 4 | Attack: 5 | Defense: 2 | IV: 11 (24%) 29 lug 11:04:20: Have WEEDLE () with 62 CP and IV 51% Stamina: 2 | Attack: 8 | Defense: 13 | IV: 23 (51%) 29 lug 11:04:20: Have WEEDLE () with 17 CP and IV 60% Stamina: 2 | Attack: 15 | Defense: 10 | IV: 27 (60%) 29 lug 11:04:20: Have ZUBAT () with 118 CP and IV 37% Stamina: 12 | Attack: 4 | Defense: 1 | IV: 17 (37%) 29 lug 11:04:20: Have ZUBAT () with 58 CP and IV 46% Stamina: 4 | Attack: 13 | Defense: 4 | IV: 21 (46%) 29 lug 11:04:20: Getting map of (40.70608053720895, -74.01303065964633) 29 lug 11:04:21: Getting initial pokestops... Exception in thread "main" com.pokegoapi.exceptions.RemoteServerException: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null at com.pokegoapi.api.map.Map.getMapObjects(Map.java:307) at com.pokegoapi.api.map.Map.getMapObjects(Map.java:270) at com.pokegoapi.api.map.Map.getMapObjects(Map.java:205) at com.pokegoapi.api.map.Map.getMapObjects(Map.java:195) at ink.abb.pogo.scraper.Bot.start(Bot.kt:92) at ink.abb.pogo.scraper.MainKt.main(Main.kt:148) Caused by: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null at com.pokegoapi.main.ServerRequest.getData(ServerRequest.java:66) at com.pokegoapi.api.map.Map.getMapObjects(Map.java:305) ... 5 more :run FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':run'.

    Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 43.86 secs

What should i do? Thanks

Evuse avatar Jul 29 '16 09:07 Evuse

What should i do? Thanks

First post:

Please give the developers time to look into the problem and do not open new issues to this problem.

Please read the the post before adding a comment.

citruz avatar Jul 29 '16 09:07 citruz

Sorry about that. I guess is a map problem. I'll wait of course. I'm glad to be in this community and i totally respect time and work of developers

Evuse avatar Jul 29 '16 09:07 Evuse

Excuse me if I'm wrong with that, but this might be a new one (at least I couldn't find an issue with the same log): http://pastebin.com/E49mvuWx

Thanks to everyone working on this bot, it was always working perfectly and I'm really glad about using it for free. ♥

highnstein avatar Jul 29 '16 09:07 highnstein

Please copy the full stacktrace starting with "Exception in thread..." and some context from the logs. Which command did you run? Which task did the bot execute?

citruz avatar Jul 29 '16 09:07 citruz

@highnstein i had the same issue and was able to fix is by using the following argument to start java. java -jar -Xss2048k pogo.scraper-all-0.5.0-alpha2.jar

This should not be in this thread

rhernaus avatar Jul 29 '16 09:07 rhernaus

I have had success on Linux by just rate limiting the box

tc qdisc add dev eth0 root netem delay 300ms rate 56kbit

@rhernaus is doing it within Java which is probably better :)

edit: of course you would need to use my method if you were running using gradle

heyitsols avatar Jul 29 '16 09:07 heyitsols

@rhernaus It also worked for me. Thanks! Now I'm getting the known ProfileLoop, BotLoop and WalkingLoop errors.

highnstein avatar Jul 29 '16 09:07 highnstein

On Mac OS you can use the "Network Link Conditioner" which is a Developer Tool by Apple and allows to limit the network bandwidth. Install Guide: http://nshipster.com/network-link-conditioner/ Drawback: This affects not only the bot but your all your network traffic will be slow.

citruz avatar Jul 29 '16 09:07 citruz