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

run example [RunInventoryReport], get error #286

Closed
Mavis00 opened this issue May 9, 2017 · 2 comments
Closed

run example [RunInventoryReport], get error #286

Mavis00 opened this issue May 9, 2017 · 2 comments
Assignees

Comments

@Mavis00
Copy link

Mavis00 commented May 9, 2017

Hi,

I need to get revenue report data from API.

I can get the result from example \examples\Dfp\v201702\OrderService\GetOrdersStartingSoon.php successfully. But I got error from the example \examples\Dfp\v201702\ReportService\RunInventoryReport.php, it show error msg as the following:

PHP Catchable fatal error: Argument 1 passed to GuzzleHttp\Psr7\rewind_body() must implement interface Psr\Http\Message\MessageInterface, null given, called in C:\inetpub\wwwroot\dfp_api\src\Google\AdsApi\Common\GuzzleLogMessageHandler.php on line 74 and defined in C:\inetpub\wwwroot\dfp_api\vendor\guzzlehttp\psr7\src\functions.php on line 274

Would you please help me out?

Thanks a lot.

@fiboknacky fiboknacky self-assigned this May 9, 2017
@fiboknacky
Copy link
Member

Hi @Mavis00

Sure. We're here to help. :-)

First, could you please confirm the client library version you're using?
Do you use the latest version or a bit earlier version?

The underlying issue would be related to the timeout value. More details can be found in #246.
To fix this, could you please try what's described in this section by setting larger value of timeout?
When the default timeout is too small, the result will not be packed as Response properly and thus null is assigned to $response in this line.

When $response is passed to the function in line 74, it thus fails.
We're also fixing this so that null will not be passed to rewind_body() anymore.

Best,
Knack

@fiboknacky
Copy link
Member

I close this issue due to inactivity.
In addition, recently we've refactored GuzzleLogMessageHandler since v27.0.0.
Please update to the latest version and try again.

Best,
Knack

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