google-ads-dotnet
google-ads-dotnet copied to clipboard
Grpc.Core.Internal.CoreErrorDetailException : failed to connect to all addresses
-
RpcException: Status(StatusCode="Unavailable", Detail="failed to connect to all addresses", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1720163325.643000000","description":"Failed to pick subchannel","file":"......\src\core\ext\filters\client_channel\client_channel.cc","file_line":3218,"referenced_errors":[{"created":"@1720163325.643000000","description":"failed to connect to all addresses","file":"......\src\core\lib\transport\error_utils.cc","file_line":165,"grpc_status":14}]}")
-
CoreErrorDetailException: {"created":"@1720163325.643000000","description":"Failed to pick subchannel","file":"......\src\core\ext\filters\client_channel\client_channel.cc","file_line":3218,"referenced_errors":[{"created":"@1720163325.643000000","description":"failed to connect to all addresses","file":"......\src\core\lib\transport\error_utils.cc","file_line":165,"grpc_status":14}]}
Version Framework 4.8
Google.Apis.Auth : 1.67.0.0 Google.Apis.Core : 1.67.0.0 Google.Ads.GoogleAds : 20.1.0.0 Google.Ads.GoogleAds.Config : 2.0.0.0 Google.Api.Gax : 4.8.0.0 Google.Ads.GoogleAds.Core : 4.0.1.0
Code :
GoogleAdsConfig config = new GoogleAdsConfig(); config.LoadFromDefaultAppConfigSection(); config.UseGrpcCore = true; GoogleAdsClient client = new GoogleAdsClient(config); Options options = new Options();
// Issues a mutate request to add the user list and prints some information. MutateUserListsResponse response = service.MutateUserLists( customerId.ToString(), new[] { operation }); string userListResourceName = response.Results[0].ResourceName; Console.WriteLine($"User list with resource name '{userListResourceName}' " + $"was created."); return userListResourceName;
App.config
<!-- Proxy settings for library. -->
<add key="ProxyServer" value="http://localhost:4500/"/>
<add key="ProxyUser" value=""/>
<add key="ProxyPassword" value=""/>
<add key="ProxyDomain" value=""/>
<!-- API-specific settings -->
<add key="DeveloperToken" value="****"/>
<!-- OAuth2 settings -->
<add key = "OAuth2Mode" value="APPLICATION"/>
<add key = "OAuth2ClientId" value = "***" />
<add key = "OAuth2ClientSecret" value = "***" />
<add key = "OAuth2RefreshToken" value = "***" />
<!--<add key = "OAuth2RefreshToken" value = "***" />-->
<add key = "UseGrpcCore" value="true"/>
</GoogleAdsApi>
Referral URL : https://github.com/googleads/google-ads-dotnet/blob/21487aa13c302dc064a3a712680b8914f2725253/Google.Ads.GoogleAds/examples/Remarketing/AddCustomerMatchUserList.cs#L200-L233
Please check below error :
Can you please help us.