All Api request are stucked without any response

186 views
Skip to first unread message

Zied Chaari

unread,
Mar 14, 2023, 5:39:19 PM3/14/23
to Google Ads API and AdWords API Forum
Hi Google Team,

We have upgrated the Google Ads API to the latest version V13. However, all calls we made are stucked without any response.
This is an example of code. 

public override SocialAudience CreateCustomAudience(SocialAudience SAudience, List<SocialCampaignItemPage> EventSource = null)
{
configGoogleAdsApi.OAuth2RefreshToken = SAudience.AdAccount.GoogleUser.Refresh_Token;
GoogleAdsClient client = new GoogleAdsClient(configGoogleAdsApi);

UserListServiceClient service = client.GetService(Services.V13.UserListService);
Google.Ads.GoogleAds.V13.Services.UserListOperation operation;

Google.Ads.GoogleAds.V13.Resources.UserList userList = new Google.Ads.GoogleAds.V13.Resources.UserList()
{
Name = SAudience.Audience.Name,
Description = SAudience.Audience.Description ?? "",
MembershipLifeSpan = 10000,
MembershipStatus = UserListMembershipStatusEnum.Types.UserListMembershipStatus.Open,
CrmBasedUserList = new CrmBasedUserListInfo()
{
UploadKeyType = Google.Ads.GoogleAds.V13.Enums.CustomerMatchUploadKeyTypeEnum.Types.CustomerMatchUploadKeyType.ContactInfo
}
};

operation = new Google.Ads.GoogleAds.V13.Services.UserListOperation()
{
Create = userList
};


try
{
Google.Ads.GoogleAds.Util.TraceUtilities.Configure(Google.Ads.GoogleAds.Util.TraceUtilities.DETAILED_REQUEST_LOGS_SOURCE, "C:\\logs\\details.log", System.Diagnostics.SourceLevels.All);

MutateUserListsResponse result = service.MutateUserLists(SAudience.AdAccount.Social_ID, new[] { operation });

UserListName userListName = UserListName.Parse(result.Results[0].ResourceName);

SAudience.Social_ID = userListName.UserListId;
SAudience.Size = 0;
return SAudience;
}
catch (GoogleAdsException E)
{
throw;
}
}

Any Help Please.
Message has been deleted

Google Ads API Forum Advisor

unread,
Mar 15, 2023, 7:09:23 AM3/15/23
to acteol...@gmail.com, adwor...@googlegroups.com

Hi Zied,

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

Can you please confirm if you have already setup logging on your end? If you haven't, here's a link to our logging documentation for the .NET client library. Once logging has been setup, kindly provide to us the complete request and response logs with request ID via Reply privately to author option so we can further investigate. Also, can you confirm if you are encountering the same issue using other Google Ads API methods?

Regards,

Google Logo Google Ads API Team


ref:_00D1U1174p._5004Q2jZbkg:ref

Zied Chaari

unread,
Mar 15, 2023, 7:53:51 AM3/15/23
to Google Ads API and AdWords API Forum
Hi,

I have already setup the logging in my end as you can see in my code, nothing is hapenning my program is stuck on the highlighted yellow line and nothing is added to my log file.

Google Ads API Forum Advisor

unread,
Mar 15, 2023, 1:10:08 PM3/15/23
to acteol...@gmail.com, adwor...@googlegroups.com

Hi Zied,

Thanks for getting back to us.

If you have already followed this guide on enabling logging in the .NET client library, and no logs still appears, then your Google Ads API request may not have been called as the issue may be in the client library. 

That said, you may try reaching out to the respective client library owner by filing an issue on the issue tracker on the Issues tab of the .NET client library on the github as they should be more equipped to provide guidance on this matter when it comes to Google Ads API client library concerns and inquiries. 

Additionally, can you also confirm if you have followed the installation guide and configuration guide on the .NET client library? You may also check on this guide regarding changes to the Google Ads API .NET library.

Regards,

Zweitze

unread,
Mar 15, 2023, 4:43:51 PM3/15/23
to Google Ads API and AdWords API Forum
You are not alone in this situation, for instance see this topic and this topic.
The problem is in the client library for .NET, when your target is .NET Framework. More info in these threads.

Google Ads API Forum Advisor

unread,
Mar 15, 2023, 6:33:06 PM3/15/23
to zwe...@gmail.com, adwor...@googlegroups.com

Hi Zweitze,

Thank you so much for pinpointing on the issue related to .NET client library. I agree with the shared issue tracker posts and it should further help down to .Net client library users to understand the issue going forward. If any user facing same issue, then we can keep eye on provided issue tracker tickets.

Thank you!!

Regards,

Zied Chaari

unread,
Mar 16, 2023, 1:49:45 PM3/16/23
to Google Ads API and AdWords API Forum
Hi Zweitze,

Thanks for your reply. 
You're right I have created a new .Net Core project and it's working.

Zied Chaari

unread,
Mar 16, 2023, 1:53:35 PM3/16/23
to Google Ads API and AdWords API Forum
I'm facing the same problem, my project is .NET client library I've tried all new versions V12 and V13 and they are not working. The only working one is V11 which will be not usefull 31/01.
Is there any urgent fix you'll do in the future so we can use V12 or V13 with .NET project not .NET Core? 

Zweitze

unread,
Mar 16, 2023, 2:34:31 PM3/16/23
to Google Ads API and AdWords API Forum
First: it's not the API version, but the library version. I created a test (WinForms, .NET Framework 4.7.2) project using library 13.0.2, connecting with Ads API V11. This worked. Then I upgraded the library to 14.0.0, but nothing else: Ads API V11 was still used. Now it hangs.
The problem is that library v13.0.2 supports Ads API v10 and v11, but V11 expires at the end of the month.

When this issue was discovered early this year, Google's response was that you can either:
  • Migrate to .NET Core, or
  • Use async methods instead.
With that remark the issue was closed (!) - nothing was done. I filed a bug that they should at least document this.

Maybe Google changes it's mind and makes upgrading easier. It's a risky approach though.
When I ran into this, there was no sign of Google addressing this issue: I bit the bullet and moved to async methods. Took me weeks.

Google Ads API Forum Advisor

unread,
Mar 16, 2023, 6:20:04 PM3/16/23
to zwe...@gmail.com, adwor...@googlegroups.com

Hi Zweitze, 

Thank you for coming back to us. I hope you are doing well today.

Moving forward to your concern, upon checking there is a related issue titled Document that programs may hang after upgrading to 14.0.0+ #488 created on github issue (googleads/google-ads-dotnet) which has a latest response. Could you please try if this will work on your end?

GoogleAdsConfig config = new GoogleAdsConfig();
config.UseGrpcCore = true;
GoogleAdsClient client = new GoogleAdsClient(config);

In addition, please see Supported Frameworks:
 

  • .NET Framework 4.7.2+ (net472)
  • .NET Standard 2.1 (netstandard2.1)
  • .NET 5.0 (net5.0)
  • .NET Core 3.1 (netcoreapp3.1)


The library doesn't have an explicit build target for .NET 6.0 (net6.0) yet. However, you can use the library with a binary built for .NET 6.0, since netstandard2.1 is compatible with .NET 6.0.

Have a great day.

Regards,

Zied Chaari

unread,
Mar 17, 2023, 8:15:40 AM3/17/23
to Google Ads API and AdWords API Forum
Hi,

Even with UseGrpcCore = true it's not working. 
I'm using .NET framework 4.8.

            GoogleAdsConfig configGoogleAdsApi = new GoogleAdsConfig
            {
                DeveloperToken = "DEVELOPER_TOKEN",
                OAuth2ClientId = "CLIENT_ID",
                OAuth2ClientSecret = "CLIENT_SECRET",
                OAuth2RefreshToken = "REFRESH_TOKEN",
                UseGrpcCore = true
            };

            GoogleAdsClient client = new GoogleAdsClient(configGoogleAdsApi);
           
            GeoTargetConstantServiceClient geoService = client.GetService(Services.V13.GeoTargetConstantService);
            string locale = "en";
            string countryCode = "GB";
            String[] locations = { "london" };

            SuggestGeoTargetConstantsRequest request = new SuggestGeoTargetConstantsRequest()
            {
                Locale = locale,
                CountryCode = countryCode,
                LocationNames = new SuggestGeoTargetConstantsRequest.Types.LocationNames()
            };

            request.LocationNames.Names.AddRange(locations);
            try
            {
                SuggestGeoTargetConstantsResponse response = geoService.SuggestGeoTargetConstants(request);
            }
            catch (Exception E)
            {

            }

Google Ads API Forum Advisor

unread,
Mar 17, 2023, 2:28:38 PM3/17/23
to acteol...@gmail.com, adwor...@googlegroups.com

Hi Zied,
 

Thank you for sending updates. Allow me to raise this concern to the rest of our team and we will provide updates shortly. 
 

Zweitze

unread,
Mar 20, 2023, 1:46:37 PM3/20/23
to Google Ads API and AdWords API Forum
Hello Forum Advisor,

Please check that issue that you referenced.
Check who reported that particular issue. Yes, that was me.

And the issue is about documentation. And yes, this breaking change is still not documented anywhere, except in issues #480 and #488
It took me four weeks (!) to get the projects in my solution working with async calls, and I think it should be fair to warn others about this change. That is the reason I point others to the issues - when I was facing the problem it took me two days to find the explanation, the then well- buried issue #480.

So it's working for me - after making everything async, as was suggested in #480
About the suggestion you make here - I already checked that long ago. When instantiating GoogleAdsConfig, it's member UseGrpcCore is already set to true. Setting it to true once more does not help.

About your question on the platform: see the issue I created.



Zied Chaari

unread,
Mar 22, 2023, 3:05:35 PM3/22/23
to Google Ads API and AdWords API Forum
Hey Goolge,

Any updates on this one? I want to know if you'll have any update before the sunset of V11. 

Zied Chaari

unread,
Mar 23, 2023, 1:59:09 PM3/23/23
to Google Ads API and AdWords API Forum
Hey  Zweitze,

I think they have fixed the issue. #488
I have tried the new library and it's working.

Zweitze

unread,
Mar 23, 2023, 3:52:45 PM3/23/23
to Google Ads API and AdWords API Forum
Hi Zied,

Thank you for keeping me updated!
But, as I said, I rewrote the code to use the async versions and continue with these sources.

Cheers,
Zweitze.

Google Ads API Forum Advisor

unread,
Apr 4, 2023, 2:41:11 PM4/4/23
to zwe...@gmail.com, adwor...@googlegroups.com
Hi All - 

I'm a developer relations engineer jumping in here. It appears as though the issues here have been resolved, but if there are further questions or issues please file an issue on the GitHub repository for the DotNet client library .

Best,
Google Logo
Ben Karl
Google Ads API Team
 


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