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

Uncaught Exception: Retrieved a unknown status code 100 #90

Closed
ro1963855 opened this issue Aug 11, 2016 · 14 comments
Closed

Uncaught Exception: Retrieved a unknown status code 100 #90

ro1963855 opened this issue Aug 11, 2016 · 14 comments

Comments

@ro1963855
Copy link

when i called the $profile->getProfileData(), i get the error message like this http://imgur.com/HziXAMw, how can I fix it. Thanks!

@lambasoft
Copy link

Please can you show all your code.

@ro1963855
Copy link
Author

this is my code http://imgur.com/a/LRgp3.

@ghost
Copy link

ghost commented Aug 11, 2016

@ro1963855 Can you please post whole error with stack trace ?

@lambasoft
Copy link

lambasoft commented Aug 11, 2016

@ro1963855 Why do you have $profile->update() ? You don't need it there. And you're using it incorrectly thus causing the error. Please remove the line that contains $profile->update() and try again.

Try following this example:
https://github.com/NicklasWallgren/PokemonGoAPI-PHP/blob/master/examples/RetrievePlayerProfile.php

@ro1963855
Copy link
Author

after i remove that line, error message became http://imgur.com/a/TBurB, and this is my code http://imgur.com/a/s9HqD

@lambasoft
Copy link

@ro1963855 Please make sure you're using the latest version of the API, do a composer update .
And try logging in with your Pokemon account you're using, just to check account is not banned/working credentials.

@NicklasWallgren
Copy link
Owner

NicklasWallgren commented Aug 11, 2016

Have you logged in using the account before?

https://github.com/Grover-c13/POGOProtos/blob/f8b7600136060965ebfa5c39ee209be2d01037b2/src/POGOProtos/Enums/StatusCode.proto

// 10X seems to relate authentication, there is probably a banned status code in this series

@DrDelay
Copy link
Collaborator

DrDelay commented Aug 11, 2016

Just an idea, if you have not logged in yet, I saw some discussion about automatic TOS accepting in keyphact/pgoapi, maybe this status code means TOS have not been accepted yet?

@NicklasWallgren
Copy link
Owner

I haven't been able to reproduce the 100 status code. I don't think it's related to TOS.

@ro1963855
Copy link
Author

I fixed this problem after I update PHP version from 5.6 to 7.0, thanks everybody for your help.

@gracefullight
Copy link

gracefullight commented Feb 15, 2017

This problem also occurs in php7 environment.

$pokemonGoApi = $application->getPokemonGoApi();
$this->logger->info('get profile');
$profile = $pokemonGoApi->getProfile();
$this->logger->info('get data');
$profileData = $profile->getData(); // <= Error occurs

@baskettcase
Copy link

Yes I just started getting this problem also

Fatal error: Uncaught exception 'Exception' with message 'Retrieved a unknown status code 100' in /home/path/public_html/games/pokemongo/vendor/nicklasw/pkm-go-api/src/Handlers/RequestHandler.php:163 Stack trace: #0 /home/path/public_html/games/pokemongo/vendor/nicklasw/pkm-go-api/src/Services/Request/InventoryRequestService.php(27): NicklasW\PkmGoApi\Handlers\RequestHandler->handle(Object(NicklasW\PkmGoApi\Requests\GetInventoryRequest)) #1 /home/path/public_html/games/pokemongo/vendor/nicklasw/pkm-go-api/src/Api/Player/Inventory.php(69): NicklasW\PkmGoApi\Services\Request\InventoryRequestService->getInventory() #2 /home/path/public_html/games/pokemongo/vendor/nicklasw/pkm-go-api/src/Api/Procedure.php(52): NicklasW\PkmGoApi\Api\Player\Inventory->update() #3 /home/path/public_html/games/pokemongo/getiv.php(97): NicklasW\PkmGoApi\Api\Procedure->__call('getPokeBank', Array) #4 /home/path/public_html/games/pokemongo/getiv.php(97): NicklasW\PkmGoApi\Api\Player\Inventory->getPokeBank() #5 /home/path/public_ in /home/path/public_html/games/pokemongo/vendor/nicklasw/pkm-go-api/src/Handlers/RequestHandler.php on line 163

It was working up until Niantic changed something yesterday.

@xmillies
Copy link

With a stack ...

( ! ) Fatal error: Uncaught Exception: Retrieved a unknown status code 100 in C:\WTServer\WWW\pogo\vendor\nicklasw\pkm-go-api\src\Handlers\RequestHandler.php on line 163
( ! ) Exception: Retrieved a unknown status code 100 in C:\WTServer\WWW\pogo\vendor\nicklasw\pkm-go-api\src\Handlers\RequestHandler.php on line 163
Call Stack
#	Time	Memory	Function	Location
1	0.0050	369432	{main}( )	...\update.php:0
2	0.0670	1874096	updateDataFromNiantic( )	...\update.php:36
3	0.3520	2832688	NicklasW\PkmGoApi\Api\Procedure->getStats( )	...\functions.php:730
4	0.3520	2832744	NicklasW\PkmGoApi\Api\Procedure->__call( )	...\functions.php:730
5	0.3520	2832744	NicklasW\PkmGoApi\Api\Player\Inventory->update( )	...\Procedure.php:52
6	0.3670	2842144	NicklasW\PkmGoApi\Services\Request\InventoryRequestService->getInventory( )	...\Inventory.php:69
7	0.3860	2874304	NicklasW\PkmGoApi\Handlers\RequestHandler->handle( )	...\InventoryRequestService.php:27

Steps 1 and 2 are my code.

@gracefullight
Copy link

Redirect to this issue

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

7 participants