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

Incorrect wire format for field 8 #153

Closed
zunfix opened this issue Oct 17, 2016 · 2 comments
Closed

Incorrect wire format for field 8 #153

zunfix opened this issue Oct 17, 2016 · 2 comments

Comments

@zunfix
Copy link

zunfix commented Oct 17, 2016

Hi,

When reading informations from Niantic, I got this error :

Fatal error: Uncaught Exception: Incorrect wire format for field 8, expected: 0 got: 2 in C:\WTServer\WWW\pogo\vendor\nicklasw\pogoprotos-php\src\POGOProtos\Data\PokemonData.php:127 Stack trace:
#0 C:\WTServer\WWW\pogo\vendor\nicklasw\pogoprotos-php\src\protocolbuffers.inc.php(84): POGOProtos\Data\PokemonData->read(Resource id #166, 128)
#1 C:\WTServer\WWW\pogo\vendor\nicklasw\pogoprotos-php\src\POGOProtos\Data\PokemonData.php(51): ProtobufMessage->__construct(Resource id #166, 128)
#2 C:\WTServer\WWW\pogo\vendor\nicklasw\pogoprotos-php\src\POGOProtos\Inventory\InventoryItemData.php(48): POGOProtos\Data\PokemonData->__construct(Resource id #166, 128)
#3 C:\WTServer\WWW\pogo\vendor\nicklasw\pogoprotos-php\src\protocolbuffers.inc.php(84): POGOProtos\Inventory\InventoryItemData->read(Resource id #166, 0)
#4 C:\WTServer\WWW\pogo\vendor\nicklasw\pogoprotos-php\src\POGOProtos\Inventory\InventoryItemData.php(30): ProtobufMessage->__construct(Resource id #166, 0)
#5 C:\WTServer\WWW\pogo\vendor\nicklasw\pogoprotos-php\src\POGOProt in C:\WTServer\WWW\pogo\vendor\nicklasw\pogoprotos-php\src\POGOProtos\Data\PokemonData.php on line 127

I think this issue could be related to Pokemons deployed in Gyms ?
I have one deployed in gym ....

I use version "d90e26ed5e94da9c92ce35eb67f4197eaa161ada" of the API.

Xavier.

@DrDelay
Copy link
Collaborator

DrDelay commented Oct 17, 2016

The version of this repo you are using is OK, but you should check the version of the NicklasWallgren/pogoprotos-php dependency. It should be at least NicklasWallgren/pogoprotos-php@5405893 - wire format 2 is correct.

Just run composer update to get the latest version.

@zunfix
Copy link
Author

zunfix commented Oct 17, 2016

It works now.

Very fast and clear answer.
Thanks a lot.

@zunfix zunfix closed this as completed Oct 17, 2016
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

2 participants