New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsyncPokemonGoException: Unknown #477
Comments
Can you post the full code where you use the methods? |
Collection stops = map.getMapObjects().getPokestops(); On 8/3/2016 3:10 PM, Fabian Terhorst wrote:
|
s.inRange() is useless. s.canLoot() also checks if it is in range. Also posting to say that I've got the same problem. |
Now I get this right after I log in. go = new PokemonGo(cre, client, time); bag = go.getInventories().getItemBag(); I have nothing between, and The second line throws the error. On 8/3/2016 3:59 PM, Jari wrote:
|
Show us the stacktrace. Also, please realize that this is for problems in THE API, not in YOUR PROJECT. If you have troubles with programming in general, this is not the right place to ask questions. |
Yeah, I am having the same problem using the 0.3.4 version available on jcenter. EDIT : also having the same problem on the current commit 6261458 Here is a stacktrace :
this is the code I use inside my thread :
|
Sadye, It seems niantic changed their secret key for 10 minutes at 4PM EST. So this would be an API error due to the hard-coded client secret & client ID in the API. the new app must have a second secret somewhere else in the apk. |
OK, seems like Niantic did something. Check : https://www.reddit.com/r/pokemongodev/comments/4w0jum/all_ptcgoogle_logins_failing_from_api/ |
Apparently they changed the way the MapObjects data from the API is provided. |
Looks like all API based on the first release of game are stopped working, the majority of users of the official PokemonGo App updated their app, so Niantic stopped the support of their older API. |
please refer to #486 |
I'm on commit ef1f52f. |
Same here. I also receive the same error message on getting pokestops after logging in. |
Me also |
Same issue, I just wanted to add that everything works most of the time so I doubt that it is a programming issue with our code. I'm assuming it had something to do with too many requests in a given period although I am throttling pokestop and pokemon scans. |
I have the same issue. My program does work for about 4 minutes or so without problems and it gives me this error randomly. I can loot pokestops and catch pokemons nicely until this gives me Async error. Sometimes before crashing it gives me this error when I try to catch a pokemon:
Then the next pokemon crashes the program. |
I think I sorta found a fix. I just cached the Go object and refreshed it once every 9 minutes. I also cached the Pokestops and refreshed them every 15 seconds. So far, no async exceptions. |
When I run
go.getInventories().updateInventories();
or
go.getMap().getCatchablePokemon();
I sometimes get this errors, and the entire thing breaks. I have to terminate and rerun. It runs fine for a while until I get the error again.
I'm on commit 6261458.
Here's the error.
com.pokegoapi.exceptions.AsyncPokemonGoException: Unknown exception occurred.
at com.pokegoapi.util.AsyncHelper.toBlocking(AsyncHelper.java:45)
at com.pokegoapi.main.RequestHandler.sendServerRequests(RequestHandler.java:155)
at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:108)
at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:84)
at PokePlay.run(PokePlay.java:220)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.pokegoapi.exceptions.RemoteServerException: Got a unexpected http code : 502
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)
... 5 more
Caused by: java.util.concurrent.ExecutionException: com.pokegoapi.exceptions.RemoteServerException: Got a unexpected http code : 502
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)
... 7 more
Caused by: com.pokegoapi.exceptions.RemoteServerException: Got a unexpected http code : 502
at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:195)
at com.pokegoapi.main.RequestHandler.run(RequestHandler.java:289)
... 1 more
com.pokegoapi.exceptions.AsyncPokemonGoException: Unknown exception occurred.
at com.pokegoapi.util.AsyncHelper.toBlocking(AsyncHelper.java:45)
at com.pokegoapi.main.RequestHandler.sendServerRequests(RequestHandler.java: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.(Inventories.java:74)
at com.pokegoapi.api.PokemonGo.getInventories(PokemonGo.java:130)
at PokePlay.login(PokePlay.java:97)
at PokePlay.run(PokePlay.java:248)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.pokegoapi.exceptions.RemoteServerException: java.net.SocketTimeoutException: Read timed out
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)
... 8 more
Caused by: java.util.concurrent.ExecutionException: com.pokegoapi.exceptions.RemoteServerException: java.net.SocketTimeoutException: Read timed out
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)
... 10 more
Caused by: com.pokegoapi.exceptions.RemoteServerException: java.net.SocketTimeoutException: Read timed out
at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:238)
at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:219)
at com.pokegoapi.main.RequestHandler.run(RequestHandler.java:289)
... 1 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at okio.Okio$2.read(Okio.java:138)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:238)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:325)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:314)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)
at okhttp3.internal.http.Http1xStream.readResponse(Http1xStream.java:186)
at okhttp3.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:53)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
at okhttp3.RealCall.execute(RealCall.java:60)
at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:193)
... 3 more
com.pokegoapi.exceptions.AsyncPokemonGoException: Unknown exception occurred.
at com.pokegoapi.util.AsyncHelper.toBlocking(AsyncHelper.java:45)
at com.pokegoapi.api.map.Map.getMapObjects(Map.java:410)
at PokePlay.run(PokePlay.java:210)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.pokegoapi.exceptions.RemoteServerException: java.net.SocketTimeoutException: timeout
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)
... 3 more
Caused by: java.util.concurrent.ExecutionException: com.pokegoapi.exceptions.RemoteServerException: java.net.SocketTimeoutException: timeout
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.Observable.unsafeSubscribe(Observable.java:9861)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
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)
... 5 more
Caused by: com.pokegoapi.exceptions.RemoteServerException: java.net.SocketTimeoutException: timeout
at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:238)
at com.pokegoapi.main.RequestHandler.run(RequestHandler.java:289)
... 1 more
Caused by: java.net.SocketTimeoutException: timeout
at okio.Okio$3.newTimeoutException(Okio.java:210)
at okio.AsyncTimeout.exit(AsyncTimeout.java:288)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:242)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:325)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:314)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)
at okhttp3.internal.http.Http1xStream.readResponse(Http1xStream.java:186)
at okhttp3.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:53)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
at okhttp3.RealCall.execute(RealCall.java:60)
at com.pokegoapi.main.RequestHandler.internalSendServerRequests(RequestHandler.java:193)
... 2 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at okio.Okio$2.read(Okio.java:138)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:238)
... 23 more
The text was updated successfully, but these errors were encountered: