Hey there,

we are currently facing several issue when using the new GoogleAds V5 API. 
After solving some issues and updating to the latest version of the 
libraries some of the issues were already resolved.

Currently we are stuck with an error while trying to add 
adGroupAdOperations via AddBatchJobOperations. The problem seems to happen 
rather randomly, since sometimes we are able to add 20 operations, 
sometimes 80 operations and sometimes even less, before the error appears. 
The ads are always exactly the same ones and in the same order every try. 
So it does not seem to be related to a specific ad itself.

In addition to this we already experimented with different retrySettings / 
timeouts increasing them to higher values to ensure it does not hit them. 
Average runtime seems to be between 20 and 60 seconds regardless.

Following values have been adapted for testing purposes:

$optionalArgs['timeoutMillis'] 
$optionalArgs['retrySettings']['initialRetryDelayMillis']
$optionalArgs['retrySettings']['retryDelayMultiplier']
$optionalArgs['retrySettings']['maxRetryDelayMillis']
$optionalArgs['retrySettings']['initialRpcTimeoutMillis']
$optionalArgs['retrySettings']['rpcTimeoutMultiplier']
$optionalArgs['retrySettings']['maxRpcTimeoutMillis']
$optionalArgs['retrySettings']['totalTimeoutMillis']

See the following logging output from the logs for request and response.

--
[2020-10-14T06:23:12.139997+00:00] google-ads.NOTICE: Request
Method Name: 
/google.ads.googleads.v5.services.BatchJobService/AddBatchJobOperations
Host: googleads.googleapis.com
Headers: {
    "x-goog-api-client": "gl-php\/7.4.6 gapic\/ gax\/1.5.0 grpc\/1.32.0",
    "x-goog-request-params": 
"resource_name=customers\/6260240422\/batchJobs\/3534382286",
    "developer-token": "REDACTED",
    "login-customer-id": "1773353974"
}
Request: 
{"resourceName":"customers\/6260240422\/batchJobs\/3534382286","sequenceToken":"fbdac439948b11cfeed25ffbf0fc0006","mutateOperations":[{"adGroupAdOperation":{"create":{"status":"ENABLED","adGroup":"customers\/6260240422\/adGroups\/9038118772","ad":{"id":"-13",
 
CONTENT REMOVED}

Response
-------
Headers: []

Fault
-------
Status code: 14
Details: Socket closed
Failure: {}

--
This error message is currently always followed by another error stating 
"invalid sequence token". Allthough this is most likely just a followup 
error based on the previous error.

--
[2020-10-14T06:27:26.163674+00:00] google-ads.WARNING: Request made: Host: 
"googleads.googleapis.com", Method: 
"/google.ads.googleads.v5.services.BatchJobService/AddBatchJobOperations", 
CustomerId: 6260240422, RequestId: "L50RXM8AbD9b9E_m_7KzOg", IsFault: 1, 
FaultMessage: "["The sequence token was invalid."]"
[2020-10-14T06:27:26.187647+00:00] google-ads.NOTICE: Request
-------
Method Name: 
/google.ads.googleads.v5.services.BatchJobService/AddBatchJobOperations
Host: googleads.googleapis.com
Headers: {
    "x-goog-api-client": "gl-php\/7.4.6 gapic\/ gax\/1.5.0 grpc\/1.32.0",
    "x-goog-request-params": 
"resource_name=customers\/6260240422\/batchJobs\/3534382286",
    "developer-token": "REDACTED",
    "login-customer-id": "1773353974"
}
Request: 
{"resourceName":"customers\/6260240422\/batchJobs\/3534382286","sequenceToken":"fbdac439948b11cfeed25ffbf0fc0006","mutateOperations":[{"adGroupAdOperation":{"create":{"status":"ENABLED","adGroup":"customers\/6260240422\/adGroups\/9038118772","ad":{"id":"-13",
 
CONTENT REMOVED}

Response
-------
Headers: {
    "request-id": "L50RXM8AbD9b9E_m_7KzOg",
    "date": "Wed, 14 Oct 2020 06:27:26 GMT",
    "alt-svc": "h3-Q050=\":443\"; ma=2592000,h3-29=\":443\"; 
ma=2592000,h3-27=\":443\"; ma=2592000,h3-T051=\":443\"; 
ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q046=\":443\"; 
ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; 
v=\"46,43\""
}

Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: 
{"errors":[{"errorCode":{"batchJobError":"INVALID_SEQUENCE_TOKEN"},"message":"The
 
sequence token was invalid."}]}
--

We are using PHP 7.4 with the latest C Implementation for protobuf.

Versions:
grpc     1.32.0   stable
protobuf 3.13.0.1 stable

Some further help would be apprecitated.

Regards

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b51d0d7d-4f07-4ed4-aa4b-5bf6f036adeen%40googlegroups.com.

Reply via email to