Reporting Error: Error occurred during parsing: Enum field only accepts integer or enum value name. (Used to work previously)

98 views
Skip to first unread message

Christoph Lanz

unread,
Jun 20, 2019, 5:06:53 PM6/20/19
to AdWords API and Google Ads API Forum
Hello,

I have a query to download information for Expanded Text Ads, which used to work fine until two days ago. Since then, I get the following error, telling me that "Enum field only accepts integer or enum value name".
I investigated the issue and found that for some ads I can download the information without problem, and for others not - but I couldnt find a common pattern.

Could you help me, to see if I need to update the query, or to pre-filter some values that might cause the error?

Many thanks in advance!

Christoph


The error message that I get is the following:

Fatal error: Uncaught Google\Protobuf\Internal\GPBDecodeException: Error occurred during parsing: Error occurred during parsing: Enum field only accepts integer or enum value name in /www/htdocs/w01745db/api.thegoodtraffic.com/V1/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php:1256 Stack trace: #0 /www/htdocs/w01745db/api.thegoodtraffic.com/V1/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php(742): Google\Protobuf\Internal\Message->parseFromJsonStream(Object(Google\Protobuf\Internal\RawInputStream)) #1 /www/htdocs/w01745db/api.thegoodtraffic.com/V1/vendor/google/gax/src/Transport/RestTransport.php(118): Google\Protobuf\Internal\Message->mergeFromJsonString('{\n "results": ...') #2 /www/htdocs/w01745db/api.thegoodtraffic.com/V1/vendor/guzzlehttp/promises/src/Promise.php(203): Google\ApiCore\Transport\RestTransport->Google\ApiCore\Transport\{closure}(Object(GuzzleHttp\Psr7\Response)) #3 /www/htdocs/w01745db/api.thegoodtraffic.com/V1/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\P in /www/htdocs/w01745db/api.thegoodtraffic.com/V1/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php on line 1256

The query is this one:

$query =
"SELECT "
. "customer.descriptive_name, "
. "customer.currency_code, "
. "customer.time_zone, "
. "campaign.campaign_budget, "
. "campaign.start_date, "
. "campaign.end_date, "
. "campaign.serving_status, "
. "campaign.status, "
. "campaign.url_custom_parameters, "
. "ad_group.status, "
. "ad_group.url_custom_parameters, "
. "ad_group_ad.ad.type, "
. "ad_group_ad.ad.expanded_text_ad.headline_part1, "
. "ad_group_ad.ad.expanded_text_ad.headline_part2, "
. "ad_group_ad.ad.expanded_text_ad.headline_part3, "
. "ad_group_ad.ad.expanded_text_ad.description, "
. "ad_group_ad.ad.expanded_text_ad.description2, "
. "ad_group_ad.ad.expanded_text_ad.path1, "
. "ad_group_ad.ad.expanded_text_ad.path2, "
. "ad_group_ad.ad.final_urls, "
. "ad_group_ad.ad.url_custom_parameters, "
. "ad_group_ad.policy_summary, "
. "ad_group_ad.status, "
. "metrics.impressions, "
. "metrics.clicks, "
. "metrics.cost_micros, "
. "metrics.all_conversions, "
. "metrics.all_conversions_value, "
. "metrics.average_position, "
. "metrics.absolute_top_impression_percentage, "
. "metrics.top_impression_percentage, "
. "metrics.conversions, "
. "metrics.conversions_value "
. "FROM ad_group_ad "
. "WHERE segments.date DURING LAST_7_DAYS"
. " AND ad_group_ad.status = 'ENABLED'" 
. " AND ad_group_ad.ad.type = 'EXPANDED_TEXT_AD'"
. " AND campaign.status = 'ENABLED'"
;  

Google Ads API Forum Advisor Prod

unread,
Jun 21, 2019, 1:51:26 AM6/21/19
to adwor...@googlegroups.com
Hi Christoph,

Could you also share your customer ID so I can further investigate? You may send your reply privately using the Reply privately to author option.

Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UCYgra:ref

Christoph Lanz

unread,
Jun 24, 2019, 11:44:35 AM6/24/19
to AdWords API and Google Ads API Forum
Hi Peter,

I investigated a bit further on this and I found a possible pattern. The field that is causing the error in the query is the following:
. "ad_group_ad.policy_summary, "

For most ads it gives back correct response, but in a few cases, when the ad is disapproved and the disapproval reason is "Cryptocurrencies" it throws the error.
Is there someting that I can do? Or does it need a change on your side?

Kind regards,

Christoph

Google Ads API Forum Advisor Prod

unread,
Jun 25, 2019, 2:35:14 AM6/25/19
to christo...@logitravel.com, adwor...@googlegroups.com
Hello Christoph,

This is a known issue and we're working on fixing it.
You can follow up in this GitHub issue .

Best,
Thanet, Google Ads API Team

ref:_00D1U1174p._5001UCYgra:ref

Christoph Lanz

unread,
Jun 25, 2019, 6:14:05 AM6/25/19
to AdWords API and Google Ads API Forum
Hi Thanet,

Great, I'm sure this will be fixed soon then!

I have problems opening the link from the GitHub you sent - could I please ask you to send it again? Many thanks!

Christoph

Google Ads API Forum Advisor Prod

unread,
Jun 25, 2019, 6:23:49 AM6/25/19
to christo...@logitravel.com, adwor...@googlegroups.com
Hello Christoph,

I'm sorry for that. Somehow the link was lost.
The actual link is this one.


Best,
Thanet, Google Ads API Team

ref:_00D1U1174p._5001UCYgra:ref

Christoph Lanz

unread,
Jun 25, 2019, 6:31:49 AM6/25/19
to adsapifor...@gmail.com, adwor...@googlegroups.com
Hi Thanet,

Perfect, now I'm able to follow on this, many thanks!

Kind regards, and have a nice day,

Christoph


--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/o-qlhY87NMo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/VGGqU000000000000000000000000000000000000000000000PTNGVF009jGLLUHcTIGUmwnTvtc6Xg%40sfdc.net.
Reply all
Reply to author
Forward
0 new messages