NicklasWallgren / PokemonGoAPI-PHP

Pokemon Go API PHP library
BSD 2-Clause "Simplified" License
130 stars 51 forks source link

some google account shows this error #96

Closed milowei closed 8 years ago

milowei commented 8 years ago

some account shows this error and some not, how to fix it ? // Retrieve the profile data $Inventory = $pokemonGoApi->getInventory();

    // Retrieve the Inventory data
    $inventorystats = $Inventory->getItems()->getStats();

Warning: get_resource_type() expects parameter 1 to be resource, null given in /Applications/XAMPP/xamppfiles/htdocs/pkg3/vendor/nicklasw/pogoprotos-php/src/protocolbuffers.inc.php on line 54

Fatal error: Uncaught InvalidArgumentException: fp must be a string or file resource in /Applications/XAMPP/xamppfiles/htdocs/pkg3/vendor/nicklasw/pogoprotos-php/src/protocolbuffers.inc.php:37 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/pkg3/vendor/nicklasw/pogoprotos-php/src/protocolbuffers.inc.php(54): checkArgument(false, 'fp must be a st...') #1 /Applications/XAMPP/xamppfiles/htdocs/pkg3/vendor/nicklasw/pogoprotos-php/src/POGOProtos/Networking/Responses/GetInventoryResponse.php(26): ProtobufIO::toStream(NULL, 9223372036854775807) #2 /Applications/XAMPP/xamppfiles/htdocs/pkg3/src/Requests/GetInventoryRequest.php(54): POGOProtos\Networking\Responses\GetInventoryResponse->read(NULL) #3 /Applications/XAMPP/xamppfiles/htdocs/pkg3/src/Handlers/RequestHandler.php(162): NicklasW\PkmGoApi\Requests\GetInventoryRequest->handleResponse(Object(POGOProtos\Networking\Envelopes\ResponseEnvelope)) #4 /Applications/XAMPP/xamppfiles/htdocs/pkg3/src/Services/Request/InventoryRequestService.php(24): NicklasW\PkmGoApi\Handlers\Re in /Applications/XAMPP/xamppfiles/htdocs/pkg3/vendor/nicklasw/pogoprotos-php/src/protocolbuffers.inc.php on line 37

DrDelay commented 8 years ago

Since you get null instead of a stream, is your machines IP possibly banned from PoGo? I heard at least DigitalOcean ranges are.

ghost commented 8 years ago

97