Grover-c13 / PokeGOAPI-Java

Pokemon Go API
GNU General Public License v3.0
1.05k stars 334 forks source link

Unable to login #849

Closed extsoft closed 7 years ago

extsoft commented 7 years ago

Description: Unable to log in.

Steps to reproduce:

  1. I try to execute the following code:
            OkHttpClient httpClient = new OkHttpClient();
            PokemonGo go = new PokemonGo(httpClient);
            go.login(new GoogleUserCredentialProvider(httpClient, "token"));
            return go.getInventories().getPokebank().getPokemons();

Expected behavior: Have a list of pokemons.

Actual behavior: Got Exception.

Stacktrace (If it's a crash):

Exception in thread "main" java.lang.IllegalArgumentException: Can't get the number of an unknown enum value.
    at POGOProtos.Enums.PokemonIdOuterClass$PokemonId.getNumber(PokemonIdOuterClass.java:1239)
    at com.pokegoapi.api.inventory.Pokedex.add(Pokedex.java:41)
    at com.pokegoapi.api.inventory.Inventories.updateInventories(Inventories.java:160)
    at com.pokegoapi.api.PokemonGo.fireRequestBlockOne(PokemonGo.java:212)
    at com.pokegoapi.api.PokemonGo.initialize(PokemonGo.java:168)
    at com.pokegoapi.api.PokemonGo.login(PokemonGo.java:164)

Version: compile 'com.pokegoapi:PokeGOAPI-library:0.4.1'

RebliNk17 commented 7 years ago

which version are you using?

extsoft commented 7 years ago

version is 0.4.1

RebliNk17 commented 7 years ago

That is the problem. 0.4.1 is an old jar Compile using the updates files this github. read instructions in the ReadMe.

extsoft commented 7 years ago

@RebliNk17 thank you! Will try.

Gegy commented 7 years ago

Did you try this, is this still occurring?

94929 commented 7 years ago

@RebliNk17 What is the most recent version of the API? It seems that 0.4.1 is the most latest one according to the readme.md.

Download

extsoft commented 7 years ago

It isn't relevant anymore.

Gegy commented 7 years ago

You should build from the latest source.

94929 commented 7 years ago

@gegy1000 Thanks for your reply, I will try that :)