NicklasWallgren / PokemonGoAPI-PHP

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

Unexpected end of stream #67

Closed GianiWVL closed 8 years ago

GianiWVL commented 8 years ago

Code I wrote:

    $application = new ApplicationKernel('******@gmail.com', ******', Factory::AUTHENTICATION_TYPE_GOOGLE);
    $pokemonGoApi = $application->getPokemonGoApi();
    $inventory = $pokemonGoApi->getInventory();
    $pokebank = $inventory->getPokeBank(); //line that throws the error

Exception I'm getting is:

Exception in protocolbuffers.inc.php line 364:
read_bytes(): Unexpected end of stream
DrDelay commented 8 years ago

See #56, this is a weird error. Are you on a revision between 79ebf348abc662451b1a15edb59fe5c448061a46 (incl) and e8d58ccfd4fd90b011a6c8b092166578a55d181c (excl)?

Introduced in #45, using the StreamWrapper works on some machines, doesn't on others.

GianiWVL commented 8 years ago

I'm on revision 12efec3 which is the one just after 79ebf34

NicklasWallgren commented 8 years ago

@GianiWVL What happens if you reinstall / update the dependencies?

DrDelay commented 8 years ago

The scope I mentioned is where the error occurs. You can either try to find out why it works on some and doesn't on some other installations, or update to after the revert in #57.

NicklasWallgren commented 8 years ago

I'll close this issue. Lets continue the discussion in the other issue https://github.com/NicklasWallgren/PokemonGoAPI-PHP/issues/56