SwipeX / PokeMate

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

Crash on startup #318

Closed Gillingham closed 8 years ago

Gillingham commented 8 years ago

I somewhat assume this is an upstream API bug, but figured I would report here anyways. When starting up the bot fairly often I get this crash:

11 Aug 2016 08:03:03 [main] INFO  PokeMate:77 - Logged in as ***
D/RequestHandler: Authenticated with static token
Exception in thread "main" com.pokegoapi.exceptions.AsyncPokemonGoException: Unknown exception occurred.                                               [22/1842]        at com.pokegoapi.util.AsyncHelper.toBlocking(AsyncHelper.java:45)
        at com.pokegoapi.main.RequestHandler.sendServerRequests(RequestHandler.j
ava:155)
        at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:108)
        at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:84)
        at com.pokegoapi.api.inventory.Inventories.<init>(Inventories.java:74)
        at com.pokegoapi.api.PokemonGo.getInventories(PokemonGo.java:153)
        at dekk.pw.pokemate.Context.refreshInventories(Context.java:195)
        at dekk.pw.pokemate.tasks.Update.runOnce(Update.java:36)
        at dekk.pw.pokemate.PokeMate.<init>(PokeMate.java:100)
        at dekk.pw.pokemate.PokeMate.main(PokeMate.java:128)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null
        at rx.exceptions.Exceptions.propagate(Exceptions.java:58)
        at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:465)
        at rx.observables.BlockingObservable.first(BlockingObservable.java:168)
        at com.pokegoapi.util.AsyncHelper.toBlocking(AsyncHelper.java:37)
        ... 9 more
Caused by: java.util.concurrent.ExecutionException: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null
        at com.pokegoapi.main.RequestHandler$1.get(RequestHandler.java:109)
        at com.pokegoapi.main.RequestHandler$1.get(RequestHandler.java:86)
        at rx.internal.operators.OnSubscribeToObservableFuture$ToObservableFuture.call(OnSubscribeToObservableFuture.java:74)
        at rx.internal.operators.OnSubscribeToObservableFuture$ToObservableFuture.call(OnSubscribeToObservableFuture.java:43)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
        at rx.Observable.subscribe(Observable.java:9957)
        at rx.Observable.subscribe(Observable.java:9924)
        at rx.observables.BlockingObservable.blockForSingle(BlockingObservable.java:445)
        ... 11 more
Caused by: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null
        at com.pokegoapi.main.ServerRequest.getData(ServerRequest.java:78)
        at com.pokegoapi.main.RequestHandler.run(RequestHandler.java:293)
        at java.lang.Thread.run(Thread.java:745)

Using the 0.4.0 jar.

kylestev commented 8 years ago

Looks like a soft ban.

maxi2mc commented 8 years ago

It happends to me the first time also, after a break. It works after that. Probably related to the token ?

kylestev commented 8 years ago

Yeah that means it's a soft ban/rate limit exceeded.

Gillingham commented 8 years ago

@kylestev odd, since I get this after not running the bot for several hours, overnight even in this case. If I restart it right after I see this crash however it works fine.

kylestev commented 8 years ago

Interesting. If it works immediately after restarting it then it is not rate limit related.

SippieCup commented 8 years ago

this is not a softban but a bug in the API. Can you give more information as to what poke mate did afterwards? did it go into an authentication loop?

SippieCup commented 8 years ago

Never mind, I found the issue. I'll commit a fix shortly.

EiTeR94 commented 8 years ago

i got a crash too on start up

i don't know if it's the same error capture1

SippieCup commented 8 years ago

Which version are you using? 0.4.1?

EiTeR94 commented 8 years ago

using the last pre release 0.4.1

SippieCup commented 8 years ago

An easy fix for now would be to use the bot without the GUI. This is a bug in the api upstream, I'll work with them to get a fix in place asap.

EiTeR94 commented 8 years ago

I'm not using the gui since the bot apear after a long time the GUI crash, i only run the console.

EiTeR94 commented 8 years ago

http://ispokemongodownornot.com/

maybe it's the cause ? google login are down

EiTeR94 commented 8 years ago

It's seems it's a ban account, i dont know if it's perma or soft, some other ppl got an error when they lunch pokemon go on their phone :/