Open chiragvels opened 1 year ago
Hello,
May I receive some assistance here, please?
Thanks
Hello Chirag,
Sorry for keeping you waiting. I didn't realize you've created this issue. Will take a look soon. By the way, you used Google Ads API v13 with grpc, correct? Would you mind sharing other information like the grpc, protobuf and gax-php version? And do you still face this issue when running the same query? (I can check your query internally, so you don't need to share it here)
Knack
Hello Knack,
Sorry for keeping you waiting. I didn't realize you've created this issue. Will take a look soon.
By the way, you used Google Ads API v13 with grpc, correct?
Yes correct.
Would you mind sharing other information like the grpc, protobuf and gax-php version?
================= PHP EXTENSION INFORMATION The PHP Extension grpc is installed: 1.54.0 The PHP Extension protobuf is installed: 3.22.3 PHP Version => 8.1.2-1ubuntu2.13 "x-goog-api-client": "gl-php\/8.1.2-1ubuntu2.13 gccl\/20.0.0 gapic\/20.0.0 gax\/1.19.1 grpc\/1.54.0 rest\/1.19.1 pb\/3.22.3+c",
And do you still face this issue when running the same query? (I can check your query internally, so you don't need to share it here)
Could you please also share the version of google/gax
too? Thanks.
I have also included the gax version information in my previous response.
gax/1.19.1
"name": "google/gax",
"version": "v1.19.1",
"source": {
"type": "git",
"url": "https://github.com/googleapis/gax-php.git",
"reference": "30f6b307faa9858bf58d967664467098dbbc354f"
},
Hi Chirag,
I'm trying to reproduce the error you got, but so far I cannot do it yet.
Having said that, from the error you shared on the forum, it looks like the library should be able to recognize the error because the type is google.ads.googleads.v13.errors.googleadsfailure-bin
.
Digging deeper, I think that the internal error you got probably is not an ApiException
instance, and probably falls out of this if clause. And what you saw is probably just an error message thrown up from the bottom of the stack by the throw
statement.
Could you help me verify this? Maybe you can add something around that if clause to check if my assumption is true. If yes, we can think about adding support for this internal error going forward. Thanks!
Hi Knack,
Could you help me verify this? Maybe you can add something around that if clause to check if my assumption is true.
Yes, it is. Yesterday, I encountered an internal error. However, when I attempted to debug the issue, I was unable to reproduce the error while rerunning the same example. As a result, I'm not entirely certain about the nature of the problem.
Thanks,
OK. Please let me know when you can reproduce it.
For now, I suspect that somehow the internal error thrown by the server wasn't created as an instance of ApiException
. And that's why the exception is thrown as is, but I still wonder why it's not at least an instance of Exception
, so you can catch it.
If it's not even an Exception
, we probably need to dig deeper.
I have faced same issue again.
An uncaught Exception was encountered
Type: Google\Ads\GoogleAds\Lib\V13\GoogleAdsException
Message: {
"message": "Internal error encountered.",
"code": 13,
"status": "INTERNAL",
"details": [
{
"@type": "google.ads.googleads.v13.errors.googleadsfailure-bin",
"data": "<Unknown Binary Data>"
},
{
"@type": "grpc-status-details-bin",
"data": "<Unknown Binary Data>"
},
{
"@type": "request-id",
"data": "SwfPxA_CISpD_3bpjNnoDA"
}
]
}
I think you are right its not creating instance of ApiException.
Filename: /vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V13/GoogleAdsExceptionTrait.php
Line Number: 75
Backtrace:
File: /vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V13/GoogleAdsExceptionTrait.php
Line: 50
Function: createGoogleAdsException
File: /vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V13/ServerStreamingGoogleAdsExceptionMiddleware.php
Line: 96
Function: throwGoogleAdsException
File: /vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V13/ServerStreamingGoogleAdsResponseMetadataCallable.php
Line: 63
Function: readAll
Thanks,
Is it not even Exception
either? That would be a surprise to me.
Yes, This is not even honoured Exception.
That's weird. We may need to file a bug on the gax-php repo.
Ok. What details must we include when filing a bug on gax-php repo.?
Taking a look at your recent report again, it looks like it was thrown as Exception
?
So, wasn't it caught at the last catch
?
Yes, It wasn't caught at the last catch?
That's quite weird, since it says that the uncaught exception is Google\Ads\GoogleAds\Lib\V13\GoogleAdsException
. It should have been caught at the first catch
. 🤔
Yes, But I was getting out of loop when Internal Error encountered and cron jobs are killed.
[DO NOT INCLUDE ANY PERSONAL OR SENSITIVE DATA - MAKE SURE TO REDACT CONTENT WHEN NECESSARY]
Your question: The encountered internal error is not catchable. I attempted to catch the error using various methods, but but it was not catchable. Instead, it simply breaks the cron process.
Private Reply by forum:
Reference: https://groups.google.com/g/adwords-api/c/tkvPnT-fmMo/m/IYS31igSAgAJ
How I can catch error which falls under Internal error encountered.
Thanks,