PokemonGoAPI-PHP icon indicating copy to clipboard operation
PokemonGoAPI-PHP copied to clipboard

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

Open hwiVeloper opened this issue 8 years ago • 22 comments

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

hwiVeloper avatar Feb 10 '17 06:02 hwiVeloper

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

NicklasWallgren avatar Feb 14 '17 17:02 NicklasWallgren

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 avatar Feb 14 '17 21:02 voxx

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 avatar Feb 14 '17 21:02 voxx

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

voxx avatar Feb 14 '17 22:02 voxx

@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..

hwiVeloper avatar Feb 15 '17 06:02 hwiVeloper

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

NicklasWallgren avatar Feb 15 '17 16:02 NicklasWallgren

@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.

NicklasWallgren avatar Feb 15 '17 17:02 NicklasWallgren

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

gracefullight avatar Feb 15 '17 17:02 gracefullight

@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

voxx avatar Feb 15 '17 22:02 voxx

Yes Im having this problem today also.

baskettcase avatar Feb 16 '17 04:02 baskettcase

Any news on this one?

baskettcase avatar Feb 17 '17 17:02 baskettcase

Is there a solution for this problem ?

sDenizhan avatar Feb 22 '17 14:02 sDenizhan

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.

Droeftoeter avatar Feb 22 '17 21:02 Droeftoeter

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

baskettcase avatar Feb 22 '17 21:02 baskettcase

@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.

sDenizhan avatar Feb 23 '17 07:02 sDenizhan

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

hwiVeloper avatar Feb 23 '17 07:02 hwiVeloper

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

Droeftoeter avatar Feb 23 '17 07:02 Droeftoeter

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

voxx avatar Feb 23 '17 08:02 voxx

@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.

Droeftoeter avatar Feb 23 '17 08:02 Droeftoeter

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.

baskettcase avatar Feb 28 '17 21:02 baskettcase

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

xmillies avatar Mar 09 '17 00:03 xmillies

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

xmillies avatar Mar 17 '17 09:03 xmillies