Create/Update Feed Fails with "Request contains an invalid argument" error

145 views
Skip to first unread message

John Miner

unread,
May 5, 2022, 12:45:38 PM5/5/22
to Google Ads API and AdWords API Forum
We are in the process of migrating the .NET Nuget package for "Google.Ads.GoogleAds" from version "9.0.0" to version "11.0.1", and we use C#.

After doing so, we are now making a call like the following in order to update a Feed:

using Google.Ads.GoogleAds;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.Util;
using Google.Ads.GoogleAds.V10.Services;

// We load the Google.Ads.GoogleAds.V10.Resources.Feed into the "feed" variable here.
var operation = new FeedOperation() {
    Update = feed,
    UpdateMask = FieldMasks.AllSetFieldsOf(feed)
};
var googleAdsConfig = apiContext.GetAdsApiAppConfig();
var googleAdsClient = new GoogleAdsClient(googleAdsConfig);
FeedServiceClient serviceClient = googleAdsClient.GetService(Services.V10.FeedService);
long customerId = 0; // We are storing this customer ID on our end when we create the Feed, so the 0 here is just a placeholder.
MutateFeedsResponse response = await serviceClient.MutateFeedsAsync(customerId.ToString(), new List<FeedOperation>() { operation }, cancellationToken);

Upon running the MutateFeedsAsync method, we immediately get back the following error:

{"Status(StatusCode=\"InvalidArgument\", Detail=\"Request contains an invalid argument.\", DebugException=\"Grpc.Core.Internal.CoreErrorDetailException: {\"created\":\"@1651768123.016000000\",\"description\":\"Error received from peer ipv4:172.***.**.**:443\",\"file\":\"..\\..\\..\\src\\core\\lib\\surface\\call.cc\",\"file_line\":1070,\"grpc_message\":\"Request contains an invalid argument.\",\"grpc_status\":3}\")"}

What is going on here? Updating feeds worked just fine previously, so what are we missing with v11.0.1 that is keeping us from updating Feeds?

Google Ads API Forum Advisor

unread,
May 6, 2022, 1:20:55 AM5/6/22
to john....@motominer.com, adwor...@googlegroups.com
Hi John,

Thank you for reaching out to the Google Ads API team.

Moving forward to your concern, I can see that you're encountering the InvalidArgument error which tells that the request contains an invalid argument. This could be due to invalid construction of the code and this is more client library specific. With this, I am afraid that our team would not be able to provide support to this concern as it is outside of our expertise already. That said, I would suggest reaching out to the .NET client library owner by posting your issue via the Issue Tab for them to give you guidance accordingly.

Regards,
Google Logo
Carmela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2aQrqc:ref
Reply all
Reply to author
Forward
0 new messages