Closed ro1963855 closed 8 years ago
Please can you show all your code.
this is my code http://imgur.com/a/LRgp3.
@ro1963855 Can you please post whole error with stack trace ?
@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
after i remove that line, error message became http://imgur.com/a/TBurB, and this is my code http://imgur.com/a/s9HqD
@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.
Have you logged in using the account before?
// 10X seems to relate authentication, there is probably a banned status code in this series
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?
I haven't been able to reproduce the 100 status code. I don't think it's related to TOS.
I fixed this problem after I update PHP version from 5.6 to 7.0, thanks everybody for your help.
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
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.
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.
Redirect to this issue
when i called the $profile->getProfileData(), i get the error message like this http://imgur.com/HziXAMw, how can I fix it. Thanks!