exception in GoogleUserCredentialProvider
Hi. Here my code. where token is the string returned by the web Authenticating google . all code is inside a asytask
OkHttpClient http = new OkHttpClient(); try{ GoogleUserCredentialProvider provider = new GoogleUserCredentialProvider(http); Scanner sc = new Scanner(token); String access = sc.nextLine(); provider.login(access); PokemonGo go = new PokemonGo(provider, http); }catch(LoginFailedException e){ Log.d("Julian","Fallo en el login",e); }catch(RemoteServerException e){ Log.d("Julian","Fallo en el servidor ",e); }
Upon reaching the line of pokemon go gives me the following exception .
com.pokegoapi.exceptions.LoginFailedException: invalid_request
07-29 17:24:41.759 1239 1357 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.auth.GoogleUserCredentialProvider.refreshToken(GoogleUserCredentialProvider.java:159)
07-29 17:24:41.759 1239 1357 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.auth.GoogleUserCredentialProvider.getAuthInfo(GoogleUserCredentialProvider.java:232)
07-29 17:24:41.759 1239 1357 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.api.PokemonGo.getAuthInfo(PokemonGo.java:93)
07-29 17:24:41.759 1239 1357 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.main.RequestHandler.resetBuilder(RequestHandler.java:253)
07-29 17:24:41.759 1239 1357 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.main.RequestHandler.resetBuilder(RequestHandler.java:238)
07-29 17:24:41.759 1239 1357 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.main.RequestHandler.
com.pokegoapi.exceptions.RemoteServerException: com.google.protobuf.InvalidProtocolBufferException: Contents of buffer are null
07-29 17:54:23.459 5487 5679 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:114)
07-29 17:54:23.459 5487 5679 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:84)
07-29 17:54:23.459 5487 5679 D Julian com.jchunly.pokenotificator2 at com.pokegoapi.api.inventory.Inventories.
You are tying to make too much requests at the same time, just sleep between request. (for the second strackrace you got)
Verify that you are on the latest version of our dev branch, i cant reproduce the problem.
I can reproduce this, I'm not able do call any of the api's methods.
hello may be that all problems have it is that I am intentanto accessed from developing android ???
I can not download the code as the import of da muchisimos code errors with what I have doubts that this code is not adapted to android.
where you could unburden a jar file of the updated library with codes ?
I don't think this is related to Android. I'm developing a standard application and I get this exception.
@jchunly https://translate.google.com?
I use it. Thank you
@vmarchaud do you know when you are going to release or merge the dev branch with master ?
Hi, I'm testing and I realize that when I try to connect with the same token that gives me the web of google gives me error.
I have to ask every time a new token? or I have to make a refreshtoken and save it for later connections result?
it increasingly using a different token, it gives me error on the server. It is possible to download a jar file with the current code because I have one but not the GoogleUserCredentialProvider class and I have to add manually. If I download all code and add in the project it gives me many mistakes.
a greeting. and thanks for the help.
@jchunly You could use Jitpack, which automatically compiles the code from the Github repo.
it's not the dev branch isn't it ?
Yeah, I was just editing it :smile:
so @jchunly you have to fork it. Just click on fork from the main page, top left
@adobeSlash It is the dev branch, I edited the link to point to the Development-SNAPSHOT branch. That's what I'm currently using.
So, are we agree that the issue is revolved on the dev branch ?
No, I am using the dev branch and I'm not able to login.
If I login without a token, I get no exception util I call any of the api-functions.
Im able to sign in with the google login. The only think im not using is the java Scanner object. And android devs should now that this isn´t available for android (obviously).
This is not an issue...
I'm at dev branch, can login with google token, and with ptc login/password
if you can't login right now it's because server is unstable