Skip to content
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

Fatal error: Uncaught Exception: Retrieved a unknown status code 100 #175

Open
hwiVeloper opened this issue Feb 10, 2017 · 22 comments
Open

Comments

@hwiVeloper
Copy link

hwiVeloper commented Feb 10, 2017

I have a question.

When I use getPokeBank() functionn, I get the error below.

Fatal error: Uncaught Exception: Retrieved a unknown status code 100
in /vendor/nicklasw/pkm-go-api/src/Handlers/RequestHandler.php:163

Stack trace:
  #0 /vendor/nicklasw/pkm-go-api/src/Services/Request/InventoryRequestService.php(27):
    NicklasW\PkmGoApi\Handlers\RequestHandler->handle(Object(NicklasW\PkmGoApi\Requests\GetInventoryRequest))
  #1 /vendor/nicklasw/pkm-go-api/src/Api/Player/Inventory.php(69):
    NicklasW\PkmGoApi\Services\Request\InventoryRequestService->getInventory()
  #2 /vendor/nicklasw/pkm-go-api/src/Api/Procedure.php(52):
    NicklasW\PkmGoApi\Api\Player\Inventory->update() #3 /test.php(61):

NicklasW\PkmGoApi\Api\Procedure->__call('getPokeBank', Array) #4 {main} thrown
  in /vendor/nicklasw/pkm-go-api/src/Handlers/RequestHandler.php on line 163

How can I solve this error?

my source code is..

// Authentication via Google user credentials

$manager = Factory::create($config);

$manager->addListener(function ($event, $value) {
  if ($event === Manager::EVENT_ACCESS_TOKEN) {
    $accessToken = $value;
  }
});

// Initialize the pokemon go application
$application = new ApplicationKernel($manager);

$pokemonGoApi = $application->getPokemonGoApi();

$journal = $pokemonGoApi->getJournal();

$inventory = $pokemonGoApi->getInventory();

$pokeBank = $inventory->getPokeBank(); // At this code, There is the error
@NicklasWallgren
Copy link
Owner

That particular error occurs when you send blank authinfo. Did you authenticate properly?

@voxx
Copy link
Contributor

voxx commented Feb 14, 2017

Hey @NicklasWallgren

I just started getting this same response on ALL checkChallenge and verifyChallenge requests. Nothing in my code has changed at all, but today it started throwing that error for every call.

screen shot 2017-02-14 at 1 55 22 pm
screen shot 2017-02-14 at 1 52 12 pm

-voxx

@voxx
Copy link
Contributor

voxx commented Feb 14, 2017

Looks like pogodev is working on fixes for other API's. Niantic is now validating Platform_Requests on login.

ejwfwcsnwyamanbdubcwmb-s0qeqrbbesgbh51r19773fc-6xc4a86rdqeokpnyhicdktcg6rr1kmifjpg6vmfnud-lmymjctgguog1gxmcotadwivqlftbzb6j651vkpzb4yzr4bqbf4bahynmr-p0bwuunva 4wo47mhuzpbbawcp-phfggautjm

@voxx
Copy link
Contributor

voxx commented Feb 14, 2017

Additional notes from Leah.

almost all API's don't send it on request 1
without it, you don't get an endpoint

the very first request now requires unknown6 to be passed in

@hwiVeloper
Copy link
Author

@NicklasWallgren I already wrote auth info. hmm... I'll try it again and ask again :)
@voxx Does your source work now? I should try again..

@NicklasWallgren
Copy link
Owner

Thanks for the info @voxx. I'll have to take a look into the problem.

@NicklasWallgren
Copy link
Owner

NicklasWallgren commented Feb 15, 2017

@voxx Do you know if the signature has to be valid?
This could be a problem since this library does not currently support "PlatformRequests" or any of the available hash providers.

@gracefullight
Copy link

gracefullight commented Feb 15, 2017

Retrieved a unknown status code 100
I have the same problem.
Nothing in my code has changed at all, but today it started throwing that error for every call

(certified by Google ID)
$pokemonGoApi = $application->getPokemonGoApi();

// $this->logger->info('profile');
$profile = $pokemonGoApi->getProfile(); // <= Nothing here.

// $this->logger->info('get profile data');
$profileData = $profile->getData(); // <= Throw Error

@voxx
Copy link
Contributor

voxx commented Feb 15, 2017

@NicklasWallgren

I don't believe it actually has to be valid. Many of the API's are still using 0.45 api without hash server, so I'm assuming they aren't passing completely valid signature. (Not 100% positive, but fairly certain of this.)

I don't think we need to implement hash server support at this point, but we need to refactor login to include "PlatformRequests". I can probably help cherry pick out the relevant changes from pogoapi / rocketmap that were implemented a few weeks back that cover this aspect if you need me to.

-voxx

@baskettcase
Copy link

Yes Im having this problem today also.

@baskettcase
Copy link

Any news on this one?

@sDenizhan
Copy link

Is there a solution for this problem ?

@Droeftoeter
Copy link

Droeftoeter commented Feb 22, 2017

100 means SESSION_INVALIDATED as far as I know. Basically it happens when the first request isn't also signed. The first request needs to be signed with the AuthInfo's token, the requests following that need to be signed with the AuthTicket.

@baskettcase
Copy link

Does this library have those capabilities @Droeftoeter, @NicklasWallgren ?

@sDenizhan
Copy link

@Droeftoeter it was working before last update. After that, i think somethings changed by Niantic. The AeonLucid, creator POGOProtos, updated his github repo after last update.

@hwiVeloper
Copy link
Author

I heard that Niantic updated api. So, this repo has to be updated soon.

@Droeftoeter
Copy link

Yes, basically they're slowly phasing out support for 0.45

@voxx
Copy link
Contributor

voxx commented Feb 23, 2017

0.45 is officially dead. (uk25 value for 0.45 is no longer valid as of today)

However api calls utilizing uk25 value for >0.45 to 0.57.2 still work even with completely invalid hashing. (Paid hashing key is not required to get a valid response back.)

uk25 value is known for all versions including 0.57.2, so that's not a problem.

@Droeftoeter You're PR was on the right track, but just wasnt quite right yet. I messed around with it for a couple nights but wasn't able to fully wrap my head around the proper flow and structure in order to fix it.

I'm happy to lend a hand to help rebuild it if there's interest, but I don't think I'm going to be able to do it without someone elses help who knows a little more about the proper login flow and structure.

Most of the other API's have solved it, so the code is readily available to rip out and translate, it's just going to take some time and effort from a few of the php folks to make it happen.

I had to switch to the python api for handling captcha solving logic for my map feed, but I'd love to resurrect the php api if theres still anyone around that's able/willing to step in and help.

-voxx

@Droeftoeter
Copy link

@voxx I've solved it in my own API, but 0.57.2 itself requires a hashing server. If I have time I can try to redo the PR for this lib, and also add the 0.57.2 UK25 value.

@baskettcase
Copy link

I would love it if things were updated with this library. I have most of my code using it and it's decently simple to use. Hashing server would make me feel a whole lot better since I use this library with real accounts just to get my pokemon IV's and movesets.

@xmillies
Copy link

xmillies commented Mar 9, 2017

@Droeftoeter . Do you have time to redo the PR for this lib ?

@xmillies
Copy link

@Droeftoeter. Still no time ?
I think we have no other choice than to add support hashing server .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants