'Change Details' sample code erroring over 42% of the time

77 views
Skip to first unread message

Steve Begin

unread,
Aug 19, 2023, 4:28:11 PM8/19/23
to Google Ads API and AdWords API Forum
In using the latest .NET sample code for getting GoogleAds Change Details (V14), found at https://developers.google.com/google-ads/api/samples/get-change-details, it works for 65 of 114 client customers.

However, may you please assist regarding what can be done since - for the other 49 client customers - the sample code cannot retrieve the change details because it encounters the following error?

Inner Exception 1:
ArgumentException: Cannot retrieve field value. A non-IMessage field was encountered after navigating keyword.match_type upto keyword.

Google Ads API Forum Advisor

unread,
Aug 22, 2023, 12:10:13 PM8/22/23
to steveb...@gmail.com, adwor...@googlegroups.com

Hi Steve,

Thank you for reaching out to Google Ads API Forum.

I understand that you are getting an error for some client customers when using the code example for Get Change Details. With this, could you provide us with the complete API logs (request and response with request-id and request headergenerated on your end for this error? This is so we could further check and provide more appropriate guidance.

You may then send the requested information privately via the Reply to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com  alias instead.

Reference Links:

This message is in relation to case "ref:_00D1U1174p._5004Q2nuBkK:ref"

Thanks,
 
Google Logo Google Ads API Team


Message has been deleted

Google Ads API Forum Advisor

unread,
Aug 23, 2023, 5:46:34 PM8/23/23
to steveb...@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for getting back with us.

With regards to your concern, it seems that you are using the client libraries sample codes. With that being said, you may enable logging by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from the link below. 

You may then send the requested information via the Reply privately to the author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Links included in this email:

Steve Begin

unread,
Aug 24, 2023, 2:10:57 PM8/24/23
to Google Ads API and AdWords API Forum
Hi,
I have just replied using the "to the author" option.
Thank you again for your help.

Google Ads API Forum Advisor

unread,
Aug 24, 2023, 3:17:22 PM8/24/23
to steveb...@gmail.com, adwor...@googlegroups.com

Hi Steve,

Thanks for getting back to us with the additional information.

Upon checking the provided file, I could not found Google Ads API error but below error:

  • “COULD NOT RETRIEVE DUE TO ERROR. For FieldMaskPath manual_cpc.enhanced_cpc_enabled of CustomerId 2279952422, the following error was encountered retrieving ChangeDetails: [ERROR_TEXT_START]Cannot retrieve field value. A non-IMessage field was encountered after navigating manual_cpc.enhanced_cpc_enabled upto manual_cpc.[ERROR_TEXT_END]. Here is that data: [DATA_START]System.Collections.ListDictionaryInternal[DATA_END]”

The above error information is not API origin. Add to that, above error details is not relevant to your API request where you are trying to pull the data using GAQL below:

  • SELECT change_event.resource_name, change_event.change_date_time, change_event.change_resource_name, change_event.user_email, change_event.client_type, change_event.change_resource_type, change_event.old_resource, change_event.new_resource, change_event.resource_change_operation, change_event.changed_fields FROM change_event WHERE change_event.change_date_time >= '20230726' AND change_event.change_date_time <= '20230825' ORDER BY change_event.change_date_time DESC LIMIT 10000

It seems that the .NET client library is possibly the reason behind the Inner Exception 1: ArgumentException: error.  I recommend you to consult the implementation with .NET client library owner as they are appropriate to provide insights on data retrieved and getting above mentioned errors. 

Steve Begin

unread,
Aug 24, 2023, 4:56:36 PM8/24/23
to Google Ads API and AdWords API Forum
Hi,

Thank you for taking time to look at it so quickly and accepting it in the format I was able to supply it; I appreciate it.

While there were actually 33 change items which had errors in what I sent (instead of just one), they were items collectively within 13 change events retrieved by the API.

All of those then had that same general "non-IMessage field was encountered" type of error (8 variations).

I understand you to be advising to submit a "New issue" to the .NET client library owner (which I believe is a different team in Google), and I will definitely look to do that right away.

Thank you for your guidance in pointing us in the correct direction.

Google Ads API Forum Advisor

unread,
Aug 24, 2023, 5:57:00 PM8/24/23
to steveb...@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for getting back with us.

This is acknowledged on our side. Kindly note that the .Net client library link provided is for the owners of the client library used in the Google Ads API integration and not a separate Google team. Create a new issue via this link (https://github.com/googleads/google-ads-dotnet/issues/). 

Steve Begin

unread,
Aug 24, 2023, 7:39:52 PM8/24/23
to Google Ads API and AdWords API Forum
Hi, thanks again for the extended clarification and the confirmation too. It is much appreciated!

Steve Begin

unread,
Aug 25, 2023, 12:38:31 PM8/25/23
to Google Ads API and AdWords API Forum
I have submitted this as issue 533.
Reply all
Reply to author
Forward
0 new messages