PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

com.pokegoapi.exceptions.RemoteServerException: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null

Open KyleBoyer opened this issue 10 years ago • 43 comments

Stack trace:

com.pokegoapi.exceptions.RemoteServerException: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:114) at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:84) at com.pokegoapi.api.pokemon.Pokemon.transferPokemon(Pokemon.java:106) at ink.abb.pogo.scraper.tasks.ReleasePokemon.run(ReleasePokemon.kt:46) at ink.abb.pogo.scraper.Bot.task(Bot.kt:177) at ink.abb.pogo.scraper.Bot$start$4.invoke(Bot.kt:116) at ink.abb.pogo.scraper.Bot$start$4.invoke(Bot.kt:32) 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.inventory.Inventories.updateInventories(Inventories.java:112) ... 9 more

KyleBoyer avatar Jul 28 '16 22:07 KyleBoyer

I think we're getting same error:

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:89)
        at ink.abb.pogo.scraper.MainKt.main(Main.kt:128)
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

Maybe Niantic updated their API and blocking all Bots/Maps?

casper-gh avatar Jul 28 '16 22:07 casper-gh

Having issues with all tools using pokegoAPI, now getting unexpected errors logging in (all versions including latest commit). Something definitely got patched.

https://www.reddit.com/r/pokemongodev/comments/4v36h5/is_traffic_being_throttled/

tonysguo avatar Jul 28 '16 22:07 tonysguo

@xenxes I also think they are getting something patched, all the Errors I get are errors at com.pokegoapi.*

Those errors includes:

  • Logging in Error
  • Error running loop ProfileLoop!
  • Error running loop BotLoop!
  • Error running loop WalkingLoop!
  • Failed to transfer [Pokemon]: FAILED

kasagon avatar Jul 28 '16 22:07 kasagon

I think we all got soft banned. Someone on a reddit forum was talking about trying to find out the extra data being sent by some users in the headers. They think they were bots, and might have patched it.

husbeard avatar Jul 28 '16 22:07 husbeard

need to throttle requests to 3 per second

tonysguo avatar Jul 28 '16 22:07 tonysguo

FYI logging into Emulator/phone, looting pokestops, and catching pidgey still work...so no ban

casper-gh avatar Jul 28 '16 22:07 casper-gh

Yeah, it looks like they figured out something with the bot for now. We'll have to wait for the actual brains of this operation to fix it. ;)

husbeard avatar Jul 28 '16 22:07 husbeard

People on Reddit are saying it will work if we only send 3 request/sec.

casper-gh avatar Jul 28 '16 22:07 casper-gh

How are we able to edit the requests per second in the config.properties?

husbeard avatar Jul 28 '16 22:07 husbeard

@husbeard you can't. It'll be changed in the code :) - BTW I'm interested in being a contributor ! Dunno if there's a process to becoming one :p it'd be my first open source project :p

ZeeSteen avatar Jul 28 '16 22:07 ZeeSteen

We can't confirm this, servers are very unstable right now if you look theirs status.

ghost avatar Jul 28 '16 22:07 ghost

@ZeeSteen - Thanks for the explanation.

husbeard avatar Jul 28 '16 22:07 husbeard

Is it possible that they throttle the incoming data to the server to reduce the server stress? Like, today was not really the best day a server can have.

kasagon avatar Jul 28 '16 23:07 kasagon

I've got the same error, though it seems to be playing fine through the errors on version 3.0. It's catching and collecting stops.

ansalls avatar Jul 28 '16 23:07 ansalls

@marekkobida It is not just a single line of code you can change. We would need to rewrite almost the complete structure of the bot, so there are not so many requests per second, because every "loop" is independend, so they will send request independently.

Loewe1000 avatar Jul 28 '16 23:07 Loewe1000

I'm thinking maybe create a central task queue and every loop can just throw things onto the queue and the task manager or whatever you want to call it can be responsible for making sure they are timed appropriately. If I can get this building I may take a stab at it, although I haven't really done any Kotlin.

jaredkwright avatar Jul 28 '16 23:07 jaredkwright

@jaredkwright is right you need to implement a queue maybe with callback when action succed

karael avatar Jul 28 '16 23:07 karael

Queue can solve this issue, but I feel like this is just the beginning of them tightening up holes. There are so many ways they could be detecting non-mobile client sessions and shutting them down.

Akkadius avatar Jul 29 '16 00:07 Akkadius

D/RequestHandler: Authenticated with static token D/RequestHandler: Authenticated with static token 28 Jul 20:59:49: Server returned unexpected error 28 Jul 20:59:49: Retrying... D/RequestHandler: Authenticated with static token D/RequestHandler: Authenticated with static token 28 Jul 20:59:50: Server returned unexpected error

russr123 avatar Jul 29 '16 01:07 russr123

i'm having the same 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:89) at ink.abb.pogo.scraper.MainKt.main(Main.kt:128) Caused by: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null error.

aTadTasty avatar Jul 29 '16 01:07 aTadTasty