Internal error encountered.

2,329 views
Skip to first unread message

Ahmed Kamal

unread,
Jun 26, 2023, 7:12:25 AM6/26/23
to Google Ads API and AdWords API Forum
hello,
i got the following exception 
Status(StatusCode="Internal", Detail="Internal error encountered.", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1687777578.124000000","description":"Error received from peer ipv4:216.58.211.202:443","file":"..\..\..\src\core\lib\surface\call.cc","file_line":953,"grpc_message":"Internal error encountered.","grpc_status":13}")

when i try to use UploadOfflineConversion

GoogleAdsClient client = new GoogleAdsClient(new Google.Ads.GoogleAds.Config.GoogleAdsConfig()
                {
                    LinkedCustomerId = CustomerId,
                    OAuth2ClientId = ClientId,
                    OAuth2ClientSecret = ClientSecret,
                    OAuth2RefreshToken = RefreshToken,
                    DeveloperToken = DevToken,
                    UseGrpcCore = true,
                });
                // Get the ConversionActionService.
                ConversionUploadServiceClient conversionUploadService =
                    client.GetService(Services.V14.ConversionUploadService);

                // Creates a click conversion by specifying currency as USD.
                ClickConversion clickConversion = new ClickConversion()
                {
                    ConversionAction = "Pending-Revenues",
                    ConversionValue = ConvertedValue.Value,
                    ConversionDateTime = ConversionTime.ToString("yyyyMMdd HHmmss") + " Africa/Cairo",
                    CurrencyCode = CurrencyCode
                };

                // Verifies that exactly one of gclid, gbraid, and wbraid is specified, as required.
                // See https://developers.google.com/google-ads/api/docs/conversions/upload-clicks
                // for details.
                string[] ids = { GCLID };
                int idCount = ids.Where(id => !string.IsNullOrEmpty(id)).Count();

                if (idCount != 1)
                {
                    throw new ArgumentException($"Exactly 1 of gclid, gbraid, or wbraid is " +
                        $"required, but {idCount} ID values were provided");
                }

                // Sets the single specified ID field.
                if (!string.IsNullOrEmpty(GCLID))
                {
                    clickConversion.Gclid = GCLID;
                }

                try
                {
                    // Issues a request to upload the click conversion.
                    UploadClickConversionsResponse response =
                        conversionUploadService.UploadClickConversions(
                            new UploadClickConversionsRequest()
                            {
                                CustomerId = CustomerId,
                                Conversions = { clickConversion },
                                PartialFailure = true,
                                ValidateOnly = false,
                                DebugEnabled = false
                            });

                    // Prints the result.
                    ClickConversionResult uploadedClickConversion = response.Results[0];
                    Console.WriteLine($"Uploaded conversion that occurred at " +
                        $"'{uploadedClickConversion.ConversionDateTime}' from Google " +
                        $"Click ID '{uploadedClickConversion.Gclid}' to " +
                        $"'{uploadedClickConversion.ConversionAction}'.");
                }
                catch (Exception ex)
                {

                }
and here is the stack trace

   at Google.Ads.Gax.Interceptors.UnaryRpcInterceptor.<>c__DisplayClass1_0`2.<Intercept>b__0(Task`1 oldTask)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.<>c__DisplayClass4_0.<<CallAsync>g__WaitAndCallHandlers|0>d.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Google.Api.Gax.TaskExtensions.WaitWithUnwrappedExceptions(Task task)
   at Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.CallSync(TRequest request, CallSettings callSettings)
   at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass1_0`2.<WithRetry>b__0(TRequest request, CallSettings callSettings)
   at Google.Api.Gax.Grpc.ApiCall`2.<>c__DisplayClass12_0.<WithCallSettingsOverlay>b__1(TRequest req, CallSettings cs)
   at Google.Api.Gax.Grpc.ApiCall`2.Sync(TRequest request, CallSettings perCallCallSettings)
   at Google.Ads.GoogleAds.V14.Services.ConversionUploadServiceClientImpl.UploadClickConversions(UploadClickConversionsRequest request, CallSettings callSettings)

Thanks

Google Ads API Forum Advisor

unread,
Jun 26, 2023, 3:39:34 PM6/26/23
to a.m.k...@gmail.com, adwor...@googlegroups.com

Hi,

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

With regards to your concern about "Internal error encountered" which happens occasionally, this occurs when something unexpected happened while processing the request. The common cause could be the API isn't functioning correctly. With this, what we can do is to advise you to wait for about 30 seconds, then retry the request.

If the issue still persist, kindly provide us with the complete request and response logs with request ID so we can further investigate. If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from the link. You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Reference links:

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

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages