NicklasWallgren / PokemonGoAPI-PHP

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

Call to a member function getOptions() on null #163

Closed xmillies closed 7 years ago

xmillies commented 7 years ago

After the issue Incorrect wire format for field 3 #160 we are facinf now to another issue :

Fatal error: Uncaught Error: Call to a member function getOptions() on null in C:\WTServer\WWW\pogo\vendor\google\protobuf\php\src\Google\Protobuf\descriptor.php:468 Stack trace: #0 C:\WTServer\WWW\pogo\vendor\google\protobuf\php\src\Google\Protobuf\Internal\Message.php(77): Google\Protobuf\Internal\FieldDescriptor->isMap() #1 C:\WTServer\WWW\pogo\vendor\nicklasw\pkm-go-api\src\Requests\GetJournalRequest.php(37): Google\Protobuf\Internal\Message->__construct() #2 C:\WTServer\WWW\pogo\vendor\nicklasw\pkm-go-api\src\Handlers\RequestHandler.php(218): NicklasW\PkmGoApi\Requests\GetJournalRequest->getMessage() #3 C:\WTServer\WWW\pogo\vendor\nicklasw\pkm-go-api\src\Handlers\RequestHandler.php(122): NicklasW\PkmGoApi\Handlers\RequestHandler->build(Object(NicklasW\PkmGoApi\Requests\GetJournalRequest)) #4 C:\WTServer\WWW\pogo\vendor\nicklasw\pkm-go-api\src\Services\Request\JournalRequestService.php(21): NicklasW\PkmGoApi\Handlers\RequestHandler->handle(Object(NicklasW\PkmGoApi\Requests\GetJournalRequest)) #5 C:\WTServer\WWW\pogo\v in C:\WTServer\WWW\pogo\vendor\google\protobuf\php\src\Google\Protobuf\descriptor.php on line 468

This was obtained with sample RetrieveJournalExample.php.

Error obtained with the call $journal->getPokemons(); in the loop.

NicklasWallgren commented 7 years ago

@xmillies Have you updated the dependencies?

composer update

xmillies commented 7 years ago

Yes. I have also tried with removing all vendor(s). You can try with the account I have previously sent to you.

NicklasWallgren commented 7 years ago

@xmillies The problem is due to dependency issues, my bad. Try the latest release v2.0

NicklasWallgren commented 7 years ago

@xmillies Can you reproduce the issue in v2.0?

xmillies commented 7 years ago

Now with v2.0, I get the error on issue #164. So we can close this case.