You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bit of a continuation of #585. I added <PackageReference Include="Google.Ads.GoogleAds.Extensions" Version="2.0.3" /> and decided to use the new extension to configure my google ads client. This fails with the following error:
System.ArgumentException
HResult=0x80070057
Message=Parameter was empty (Parameter 'pkcs8PrivateKey')
Source=Google.Apis.Core
StackTrace:
at Google.Apis.Util.Utilities.ThrowIfNullOrEmpty(String str, String paramName)
at Google.Apis.Auth.OAuth2.Pkcs8.DecodeRsaParameters(String pkcs8PrivateKey)
at Google.Apis.Auth.OAuth2.ServiceAccountCredential.Initializer.FromPrivateKey(String privateKey)
at Google.Ads.Gax.Config.AdsConfig.CreateCredentials()
at Google.Ads.Gax.Config.AdsConfig.get_Credentials()
at Google.Ads.Gax.Lib.AdsChannel.CreateChannel(String url)
at Google.Ads.Gax.Lib.AdsChannel..ctor(AdsConfig config, String url)
at Google.Ads.Gax.Lib.CachedChannelFactory.GetChannel(AdsConfig config, String serverUrl)
at Google.Ads.GoogleAds.Lib.GoogleAdsServiceClientFactory.CreateChannel(GoogleAdsConfig config)
at Google.Ads.GoogleAds.Lib.GoogleAdsServiceClientFactory.GetService[TService,TServiceSetting](ServiceTemplate`3 serviceTemplate, GoogleAdsConfig config)
at Google.Ads.GoogleAds.Lib.GoogleAdsClient.GetService[TService,TServiceSetting](ServiceTemplate`3 serviceTemplate)
at [REDACTED]
Steps to Reproduce:
Please provide a code snippet or steps to consistently reproduce the experienced behavior.
[DO NOT INCLUDE ANY PERSONAL OR SENSITIVE DATA IN YOUR SUBMITTED CODE]
It seems not all configurations are set on the Google ads object.
It seems the OAuth2SecretsJsonPath is not properly passed from the GoogleAdsApiOptions to the GoogleAdsConfig as the other properties are. This is the same for more properties, like OAuth2PrnEmail.
Expected behavior:
Client library version and API version:
Client library version: latest
Google Ads API version: latest
.NET version: latest
Operating system (Linux, Windowlatests, ...) and version (if the bug is platform-specific):
Request/Response Logs:
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered:
// TODO workaround see: https://github.com/googleads/google-ads-dotnet/issues/592//services.AddGoogleAdsClient(_configuration);services.AddSingleton<IGoogleAdsConfig,GoogleAdsConfig>(_ =>newGoogleAdsConfig(_configuration.GetSection("GoogleAdsApi").GetChildren().ToDictionary(x =>x.Key, x =>x.Value)));services.AddTransient<IGoogleAdsClient,GoogleAdsClient>();
Describe the bug:
A bit of a continuation of #585. I added
<PackageReference Include="Google.Ads.GoogleAds.Extensions" Version="2.0.3" />
and decided to use the new extension to configure my google ads client. This fails with the following error:Steps to Reproduce:
Please provide a code snippet or steps to consistently reproduce the experienced behavior.
[DO NOT INCLUDE ANY PERSONAL OR SENSITIVE DATA IN YOUR SUBMITTED CODE]
It seems not all configurations are set on the Google ads object.
appsettings.json
At runtime the path is expanded to a real path using https://github.com/StackExchange/StackExchange.Utils?tab=readme-ov-file#stackexchangeutilsconfiguration. This works as it should.
It seems the
OAuth2SecretsJsonPath
is not properly passed from theGoogleAdsApiOptions
to theGoogleAdsConfig
as the other properties are. This is the same for more properties, likeOAuth2PrnEmail
.Expected behavior:
Client library version and API version:
Client library version: latest
Google Ads API version: latest
.NET version: latest
Operating system (Linux, Windowlatests, ...) and version (if the bug is platform-specific):
Request/Response Logs:
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered: