NicklasWallgren / PokemonGoAPI-PHP

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

Uncaught exception 'Exception' read_bytes(): Unexpected end of stream #91

Closed ghost closed 8 years ago

ghost commented 8 years ago

After update got little bug ;-) Already deleted all files and clone/install again, didn't help :/

Fatal error: Uncaught exception 'Exception' with message 'read_bytes(): Unexpected end of stream' in /home/gnat/www/oku.pl/PokemonGoAPI-PHP/vendor/nicklasw/pogoprotos-php/src/protocolbuffers.inc.php:364 
Stack trace: 
#0 /home/gnat/www/oku.pl/PokemonGoAPI-PHP/vendor/nicklasw/pogoprotos-php/src/POGOProtos/Networking/Envelopes/ResponseEnvelope.php(95): Protobuf::read_bytes(Resource id #129, 21788, 9223372036854775795) 
#1 /home/gnat/www/oku.pl/PokemonGoAPI-PHP/src/Handlers/RequestHandler.php(257): POGOProtos\Networking\Envelopes\ResponseEnvelope->read(Resource id #129) 
#2 /home/gnat/www/oku.pl/PokemonGoAPI-PHP/src/Handlers/RequestHandler.php(242): NicklasW\PkmGoApi\Handlers\RequestHandler->unmarshall(Object(GuzzleHttp\Psr7\Response)) 
#3 /home/gnat/www/oku.pl/PokemonGoAPI-PHP/src/Handlers/RequestHandler.php(118): NicklasW\PkmGoApi\Handlers\RequestHandler->call(Object(POGOProtos\Networking\Envelopes\RequestEnvelope)) 
#4 /home/gnat/www/oku.pl/PokemonGoAPI-PHP/src/Services/Request/InventoryRequestService.php(21): NicklasW\PkmGoApi in /home/gnat/www/oku.pl/PokemonGoAPI-PHP/vendor/nicklasw/pogoprotos-php/src/protocolbuffers.inc.php on line 364
NicklasWallgren commented 8 years ago

How did you authenticate?

paoloalby commented 8 years ago

A user just got the same error from my website trying to authenticate with Google Auth Key. But I can't reproduce the error. If I try, I don't get any error like this, and I can login without any problems.

schermata 2016-08-11 alle 16 08 49

ghost commented 8 years ago

looks like PTC working. Got problem with google user/pass auth.

NicklasWallgren commented 8 years ago

Do you experience the same problem if you login using auth code?

ghost commented 8 years ago

yes. with auth token also same error.

NicklasWallgren commented 8 years ago

Fixed in latest commit.