jabbink / PokemonGoBot

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

Summary: Changes to Pokemon API #627

Closed HoneyWheat closed 8 years ago

HoneyWheat commented 8 years ago

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:

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.

Mewks commented 8 years ago

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

joepeding commented 8 years ago

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...

langerhans commented 8 years ago

@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.

ghost commented 8 years ago

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

langerhans commented 8 years ago

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

ghost commented 8 years ago

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

ghost commented 8 years ago

@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 commented 8 years ago

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?

accident12123 commented 8 years ago

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.

Smashtray commented 8 years ago

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.

pahi commented 8 years ago

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.

Evuse commented 8 years ago

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.

BUILD FAILED

Total time: 43.86 secs

What should i do? Thanks

citruz commented 8 years ago

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.

Evuse commented 8 years ago

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

highnstein commented 8 years ago

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. ♥

citruz commented 8 years ago

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?

rhernaus commented 8 years ago

@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

heyitsols commented 8 years ago

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

highnstein commented 8 years ago

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

citruz commented 8 years ago

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.

gabrielklein commented 8 years ago

Interesting analysis! It means they are not fixing issues with cheaters, but performance issues or protecting against DDOS.

accident12123 commented 8 years ago

they have been known to mass ban in their last game, this is probably just step 1 in locating everyone to ban at a later date.

gabrielklein commented 8 years ago

Yes I expect to be banned at some point. (and I don't care ;) )

But I think they have other problems to focus on... like having a game that work with normal users (the server are often down or overloaded.).

babfrag commented 8 years ago

For docker users : bot is working fine inside container with traffic control. https://github.com/jabbink/PokemonGoBot/issues/590

Psycophagus commented 8 years ago

@pahi How exactly do you setup what you did? im kinda new but you seem to have found a solution?

rhernaus commented 8 years ago

Throttling network traffic also works on Windows. You can use NEWT and throttle your network interface to 300ms latency en 1kB throughtput. untitled2

https://blog.mrpol.nl/2010/01/14/network-emulator-toolkit/ PokemonGoBot

Evuse commented 8 years ago

@rhernaus can you help me setup a full working pack on Debian or Mac OSX? Thanks

pvase666 commented 8 years ago

@rhernaus How can I edit throughtput ?

rhernaus commented 8 years ago

@pvase666 On the tab BW&Queue set Bandwith to 56 kbps for example. Together with latency 300ms it should work.

ghost commented 8 years ago

@rhernaus sorry but i cannot find this tab, where is?

accident12123 commented 8 years ago

my bot is remote and the 56k on the box wasn't going to cut it...

I like the below better. The theory is it is using latency to not have more then 3 commands a second be sent to the servers. There is some hiccups usually when profile update runs and it's usually walking loop that takes the hit so i'm happy. with just latency, you can still receive and send lots of data quickly, just delays between packets so large data returns from servers and gui run more to my liking

tc qdisc add dev eth0 root netem delay 600ms

you could probably adjust profile loop delay or slightly higher latency if you want to fine tune it even more.

heyitsols commented 8 years ago

@accident12123 yours gives me fewer loop errors that mine ^_^

ncovercash commented 8 years ago

For those of you on OS X you can use the Network Link Conditioner for Xcode found inside the Hardware IO Tools. These can be found at http://developer.apple.com/download/more/. I am not sure if they require Xcode

Padrino02 commented 8 years ago

@rhernaus How can I throttle my network traffic like you did on your screens? I downloaded NEWT but I can't figure out what to do there... Really hope you can help me

iamthasasquatch commented 8 years ago

@Padrino02 you need to click configuration->new link, then click configuration new filter then click the add button. Now click close. now double click the up and down dots under link. click the latency tab and click fixed latency add 300 then click BW&Q check bandwidth and make sure its set on 56 then click ok then click the little play button at the top it will slow all your internet connection based applications/web browsing down not just the bot itself so be prepared to not use the computer while botting with this solution.

Luuk-Hondius commented 8 years ago

PTC Accounts still works pretty good, they don't get most of these Errors and still do the normal amount of XP an Hour. But google is just all f****\ up.

Rickx058 commented 8 years ago

Looks like they are beginning to fight the bot creators(?): http://prnt.sc/bz2di7 http://prnt.sc/bz2dzn http://prnt.sc/bz2e6u http://prnt.sc/bz2eoi

, Was just something I found, doesn't look very serious. It is more to scare people off.

Agronis commented 8 years ago

Big deal - so we go to a private git.

karael commented 8 years ago

yep we should

vleud101 commented 8 years ago

How do we stay involved of the project?

80rrego commented 8 years ago

So i only run the Network emulator with that config and botloop problem solved? sorry I get lost I didnt understand

langerhans commented 8 years ago

Don't jump to conclusions folks. Where did those Screenshots come from? Are they legit? Blah blah blah, let's stay calm and do our due diligence before we rush to actions 🖒

Royalxm commented 8 years ago

It also says "[...] potentially violate the .., [...]".

tuccy commented 8 years ago

to clarify a little more about these issue i think that problem is the protocol bugger returned by api GetMapObjectsResponseOuterClass.GetMapObjectsResponse.parseFrom(serverRequest.getData()); is raising RemoteServerException(e)

at pokegoapi/api/map/Map.java inside public MapObjects getMapObjects(List cellIds)

meekzyr commented 8 years ago

If you didn't notice, it describes this repo is a man-in-the-middle attack. Clearly this is not the case.

TunnelSnakesThatsus commented 8 years ago

Im having the static token issue whats the fix to that or is there no fix atm?

ChaostixZix commented 8 years ago

Im Having Static Token Issue Too

OmarElsebai commented 8 years ago

Why is everyone opening this issue not reading the op's post?

TunnelSnakesThatsus commented 8 years ago

I got the fix now thanks!!!

ChaostixZix commented 8 years ago

@TunnelSnakesThatsus How To Fix It?