SwipeX / PokeMate

Automated PokemonGo Application
GNU General Public License v3.0
112 stars 46 forks source link

[Exception] Contents of buffer are null (InvalidProtocolBufferException) #190

Closed kyleshrader closed 7 years ago

kyleshrader commented 7 years ago

This is happening on startup.

Exception in thread "main" 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.PokemonGo.<init>(PokemonGo.java:90)
    at dekk.pw.pokemate.PokeMate.<init>(PokeMate.java:62)
    at dekk.pw.pokemate.PokeMate.main(PokeMate.java:93)
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)
    ... 4 more
SippieCup commented 7 years ago

Server error, we will be handling these errors in an update soon.

soccertj commented 7 years ago

Mine looks similar but happens while running http://imgur.com/a/fOtZI

yirenye commented 7 years ago

Same Exception: Exception in thread "main" 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.inventory.Inventories.(Inventories.java:74) at com.pokegoapi.api.PokemonGo.(PokemonGo.java:86) at dekk.pw.pokemate.PokeMate.(PokeMate.java:62) at dekk.pw.pokemate.PokeMate.main(PokeMate.java:93) 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) ... 5 more

pkgofan commented 7 years ago

Me too, right when I launch

AktasC commented 7 years ago

Kinda similar error here :

Exception in thread "main" com.pokegoapi.exceptions.RemoteServerException: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null at com.pokegoapi.api.player.PlayerProfile.updateProfile(PlayerProfile.java:92) at com.pokegoapi.api.player.PlayerProfile.(PlayerProfile.java:74) at com.pokegoapi.api.PokemonGo.(PokemonGo.java:85) at dekk.pw.pokemate.PokeMate.(PokeMate.java:62) at dekk.pw.pokemate.PokeMate.main(PokeMate.java:93) Caused by: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null at com.pokegoapi.main.ServerRequest.getData(ServerRequest.java:66) at com.pokegoapi.api.player.PlayerProfile.updateProfile(PlayerProfile.java:90) ... 4 more

SSinischo commented 7 years ago

Same issue. Bot is useless since we can't get past it :(

jdmloki commented 7 years ago

Yeah, I haven't been able to get passed those errors either

SippieCup commented 7 years ago

I'll be working on this tonight. Please be patient.

teyhouse commented 7 years ago

It's because of this: https://www.reddit.com/r/pokemongodev/comments/4v3twy/request_throttling/?st=ir7bgfoo&sh=b47ffeac

jinkawasaki333 commented 7 years ago

I got the same error plus this one:

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 dekk.pw.pokemate.tasks.TagPokestop.run(TagPokestop.java:23) at dekk.pw.pokemate.tasks.TaskController.lambda$run$0(TaskController.java:41) at java.util.ArrayList.forEach(ArrayList.java:1249) at dekk.pw.pokemate.tasks.TaskController.run(TaskController.java:41) 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) ... 7 more

SippieCup commented 7 years ago

Fixed in my new release. It will be hard to compile from source due to jitpack screwing up.

PR made to SwipeX branch.

https://github.com/SippieCup/PokeMate/releases/tag/2.3.5

jinkawasaki333 commented 7 years ago

@SippieCup The UI and pop-ups cannot be turned off although it has been set in the config :(

iDreamInBinary commented 7 years ago

@jinkawasaki333 Pretty sure you're using an outdated config file.

Open your config in an editor, press CTRL+H and replace "-" with "_"

jinkawasaki333 commented 7 years ago

@iDreamInBinary Thanks! :D The IV percentage is missing in the log in the latest version. It also doesn't log which pokeball it is using to catch the pokemon.

It is possible to turn these on?

SippieCup commented 7 years ago

Its implemented, just not in the config file. Just add it in yourself.

gsisso commented 7 years ago

@jinkawasaki333 just look for (src/main/java/dekk/pw/pokemate/tasks/CatchPokemon.java) - String output = "Caught a " + StringConverter.convertPokename(target.getPokemonId().name()) + " (" + p.getCp() + " CP)" + " (Candy: " + p.getCandy() + ")";

and replace with - String output = "Caught a " +StringConverter.convertPokename(target.getPokemonId().name()) + " (" + p.getCp() + " CP)" + " Using : "+ pokeball.name() +" (Candy: " + p.getCandy() + ")";

or something like that.

@SippieCup I have tried to use your sources but seem like issue still there ? does it have something to do with gradle doesn't pull the latest release of pokemon go api ?

iDreamInBinary commented 7 years ago

That "fix" in pokego api is a bad joke

SSinischo commented 7 years ago

Let's keep the comments pertinent to the original issue. With the latest release I am still getting "contents of buffer are null" and can't login.

SippieCup commented 7 years ago

This has been handled to the best of the ability that the bot can.

Closing thread.

If this becomes an issue again, we may revisit alternative solutions.