Open douglas-pires opened 3 years ago
Just to add more colors to this, doing some investigation, inside service
, we have this method: buildMutationRequestAndService
, which calls services.MutateOperation
. In a normal flow, it should return a mutate_operations
array with the getter to the operator:
When trying to create the account_budget
, or billing_setup
the get accessor is undefined.
So, I think something happens inside google-ads-node
, that doesn’t have a correct mapping. But I’m totally guessing here. The google-ads-node
repository seems to be minified and the code is not that clear.
We turned grpc logging Request headers:
:method: POST
:path: /google.ads.googleads.v7.services.GoogleAdsService/Mutate
(I omitted all the rest parameters)
We added some debug info and found that we send next buffer:
{
message: <Buffer 00 00 00 00 0c 0a 0a 36 34 39 39 37 34 37 30 34 39>,
flags: undefined
}
which encoded to:
6499747049
Seems pretty empty.
When we tried to do mutation operation to update customer name to compare payload bodies, payload was:
6499747049m�j
E
customers/6499747049�,NEW NAME FOR TEST ACCOUNT!
resource_name
descriptive_name (
Which seems good and it worked without error.
So for billing setup it seems we send to Google Ads API empty payload and that is why we get back error:
Mutate operations must have 'create', 'update', or 'remove' specified
@kritzware can you please take a look?
Thanks for all the details from both of you. I'm able to recreate this on my end and am looking into it 👍
So it seems like the proto MutateOperation
is missing the key billing_setup_operation
, which would explain why the data is missing when being converted to a binary message. Thanks for finding that @eliotik.
This library seems to handle everything correctly and passes the data down to google-ads-node and the gapic client correctly, so I'm fairly certain this is what's causing the issue. I'll message our Google contacts and see what they think.
Hi @kritzware thank you for looking into it.
@kritzware hi, how do you get protobufs to repository?
@eliotik the proto files are compiled over in the google-ads-node repository. Specifically they're pulled in during the build process of a Docker container (done this way so it's easier to run reliable builds across our team). You can find the line that does this here: https://github.com/Opteo/google-ads-node/blob/master/Dockerfile#L22
The proto files are hosted in the googleapis/googleapis repository.
Thank you @kritzware . Regarding MutateOperation, it seems it's never had it, look in v4 https://github.com/googleapis/googleapis/blob/d76f26f335b2b570b7e19d938f35f9894236e565/google/ads/googleads/v4/services/google_ads_service.proto#L697
Hi @kritzware sorry for bothering you, do you have any news? There is a chance that google suspends accounts without billing info but with campaigns. We create hundrends of accounts and add camapings into them, and manually add billing info to new accounts. But for those accounts we didn't add billing info we started to have suspenssions.
@eliotik we will raise the issue with our Google contacts next time we speak to them
Hi @WillCooter do you have any news?
@WillCooter @kritzware Just checking on this one in case Google has gotten back to you.
I believe https://github.com/Opteo/google-ads-api/issues/316 https://github.com/Opteo/google-ads-api/issues/331 and this error are all related.
Even in the v9 protos there are a number of operations missing (I've personally encountered the same issues when mutating customer_user_access_invitation
and customer_user_access
resources)
Edit: In the interest of getting this solved, I've also tried reaching out to some contributors to the above repo via email without any response :/
Problem still occurs
Any solution or workaround for this? Basically we need a way to create a new billing setup for an account. If anyone has any ideas please let us know, your help would greatly appreciated.
Anyone looking for a alternative solution, you can use the REST api to create a billingSetup https://developers.google.com/google-ads/api/rest/reference/rest/v9/customers.billingSetups/mutate#BillingSetupOperation
However, if you're trying to create a billing setup for a sub account under a manager account, we run into this error errorCode: { billingSetupError: 'NO_SIGNUP_PERMISSION' }
Based on this thread https://groups.google.com/g/adwords-api/c/QhkOYO5bzqE/m/23GwhAY6AwAJ, it's a problem on google's end.
@eliotik how do you turn on grpc logging?
Hi folks, it's me again! 👋🏻
Package version: 5.2.0
While trying to create an
account_budget
with:or with
or even
In all cases I have the same error: