-
Notifications
You must be signed in to change notification settings - Fork 769
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
Issue with download reports and custom reporting settings #247
Comments
Hello, Could you please share your report definition or AWQL (and also if you included zero impressions or not)? Best, |
Hello Knack,
3)client library version : v25.3.0, PHP version : PHP Version 5.5.9-1ubuntu4.20
please let me know if more info required. Thanks, |
Hello,
Do you mean the example I mentioned can run without issues, but the issues occurred when you tried to use the utility directly and happened only in Ubuntu? And can you run other examples like GetCampaigns? When you said you couldn't download the report, did the program just freeze? Sorry for many questions. Cheers, |
Hello Kanck, Do you mean the example I mentioned can run without issues, but the issues occurred when you tried to use the utility directly and happened only in Ubuntu? And did this happen for all versions or only v201609? And can you run other examples like GetCampaigns? I asked because I'd like to confirm if the issue happens on using Guzzle only or not. When you said you couldn't download the report, did the program just freeze? Thanks |
Hello @chiragvels It looks like not the issue of Could you please send your code snippet and your client customer ID to adwordsapiadvisor@google.com please? Thanks in advance. Best, |
Hello Knack, Finally able to identify issue. I am able to sorted out issue, under examples there is no logging enable but on my production I have enabled the logging and my log folder has permission 755, which is the issue, when I changed it to 777 and revert back to 755, it worked fine. Same with the report download folder. So may be issue with folder permission. I think this permission issue need to be managed by library? |
Hello @chiragvels, The client library shouldn't modify or create anything on your file system without your intention, so I think this work as intended. Best, |
Thanks Knack for reply. What should be permission for log and reports download folder? Thanks |
Hello Knack, Also noticed that I need to set reporting settings like includeZeroImpressions data or addHeader through api ini file or when preparing user sessions. I feel that I cannot use the functionality better way If i need to download more reports/different reports with custom settings. I mean that I have multiple clientCustomerId whose report I download on daily basis, in some case I need to pass includeZeroImpression(custom as per report) and in some case I need to pass some other settings. For that I need to make session again for this only change. In earlier API I can set that on reportDefination level. The same flexibility is missing for same session with different reporting settings. Thanks, |
Hello @chiragvels Thanks for your feedback. As for the usage of the library itself, do I understand correctly that if the Best, |
Hello Knack, Yes, you are right includeZeroImpressions was removed from report definition, I mean to use like below, when we can set options to add ZeroImpressions or not.
Yes, I can set settings under AdWordsSession, like I did
But my question is I need to set session again for same clientCustomerId for the report that required to include zero impression true or any other reporting related settings. For for same clientCustomerId I have to create session 1) for includedZeroImpressions false like ->includeZeroImpressions(false) So For same customerId I have to make 2 session just for this settings. If we have options like earlier API than It would not required to have session again, I can just pass optional settings to $session. Thanks, |
I agree that it would be nice to be able to change at least some AdWords session settings once it has already been built instead of having to completely rebuild it every time we need to change sth. |
Hello Knack, I have also noticed that when we downloading report lets say for last 15 days on daily basis. In my case I tried to download report for 10 clientCustomerId for last 15 days to test the new API. I failed to download at least 12 reports(In all above mentioned condition, No data), and guzzle not even gives error for that report. Thanks, |
Hello @chiragvels Could you please have a look at #246 too? Best, |
Ok Knack, Let me try the workaround and will test again in some time and let you know. In my case there is no large report (not even more than 1 MB), but let me try. Thanks, |
Hello Knack, Not helped. Still missed the reports when downloading day by day report. Seems like my issue was different than #246 As I said I am not able to download report with same session. Like I have set the Adwords session once and try to download last 15 days data day by day. So total of 15 reports for one client customer ID. Please let me know how I can achieve same. Also tested with old library, I am not facing this issue with old library. Thanks, |
Hello Chirag, It's not common that there are no exceptions or errors at all. And could you attach code snippet here? How do you loop to download reports? Cheers, |
Hello Knack, I have enabled the error reporting but still some of the reports are missing without giving exceptions or error. Can you please provide me email, so that I can send you code snippet. |
Hello Chirag, Please send to adwordsapiadvisor+thanet@google.com. Best, |
Hello Knack, I had tried this 4-5 times to produce exceptional error or PHP error, but not able to get the error, but same time not getting all the reports. In between missing some of the reports. I am thinking that it may be issue while using custom date as start date and end date both as same date. But it is happening on randomly for client customerId . Thanks, |
Hello Chirag, Sorry for late reply. Best, |
Hello Knack, Ok, I am still facing issue, checked latest today also. Thanks, |
Hello Knack, Have you able to look into this? Thanks |
Hi Chirag, I'm sorry for late reply. It looks like your missing reports are random, right? Can you try making your cron script put some sleep time between each report download? Best, |
Hello Knack, It looks like your missing reports are random, right? There are no patterns of what kind of report definition or date range would fail this? If this is true, then only possible factor that I can think of for now, is the connection issue between your computer and the API server. Can you try making your cron script put some sleep time between each report download? And just curious, how did you know that the script stops at the Guzzle HTTP request step if no errors were printed out at all? Thanks, |
This is where I think we could get more clues. In many cases I see so far, if there's anything wrong about connection or timeout, it should produce some messages or exceptions.
This library uses Guzzle and is thus quite different from that used in the old library. |
Hello Knack, This is where I think we could get more clues. $response = $this->httpClient->request( In many cases I see so far, if there's anything wrong about connection or timeout, it should produce some messages or exceptions. |
Hello Knack, Can you try making your cron script put some sleep time between each report download? I will try for more accounts tomorrow and let you know the final outcome. Thanks, |
Hi Chirag, This reminds me of the previous issue you've reported: file permission. Besides, you may want to investigate the Best, |
Hello Knack, Besides, you may want to investigate the saveToFile() method as well. |
Hello Knack, Great help, Seems like adwords API is giving reports faster then anyone can imagine. But still my report settings suggestions are to be consider. :) |
Yep, we'll consider that. |
Report settings override is supported in v28.0.0. |
Hello All,
I am not able to download report with this new API.
it was issue with makeReportRequest under ReportDownloader.php
I am not able to get $response,
beyond this line not able go.
$response = $this->httpClient->request(
'POST',
rtrim($this->session->getEndpoint(), '/')
. self::$REPORT_DOWNLOAD_URL_PATH,
$requestOptions
);
I am not able to make request().
Also not going to ClientException $e, so that I can understood what can be problem.
Please help me here, how to proceed now? Neither getting response nor exception.
guzzle http client
GuzzleHttp\Client Object
(
[config:GuzzleHttp\Client:private] => Array
(
[handler] => GuzzleHttp\HandlerStack Object
(
[handler:GuzzleHttp\HandlerStack:private] => Closure Object
(
[static] => Array
(
[default] => Closure Object
(
[static] => Array
(
[default] => GuzzleHttp\Handler\CurlMultiHandler Object
(
[factory:GuzzleHttp\Handler\CurlMultiHandler:private] => GuzzleHttp\Handler\CurlFactory Object
(
[handles:GuzzleHttp\Handler\CurlFactory:private] =>
[maxHandles:GuzzleHttp\Handler\CurlFactory:private] => 50
)
)
Thanks,
The text was updated successfully, but these errors were encountered: