Skip to content

Issue Creating Campaign due to failure during CampaignBudget Creation. #412

@armelHx

Description

@armelHx

Hello team,

We're getting errors while creatingCampaigns due to the following error below:

2021-03-19 14:02:21,704 INFO  [TRACEID:  ,SPANID: ] [Gax-832] [] c.g.ads.googleads.lib.request.detail    : FAILURE REQUEST DETAIL.
Request
-------
MethodName: google.ads.googleads.v6.services.CampaignBudgetService/MutateCampaignBudgets
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=REDACTED, login-customer-id=5531825568, x-goog-api-client=gl-java/11.0.3 gapic/ gax/1.57.0 grpc/1.30.2}
Body: [FAILED toString()]

Response
--------
Headers: Metadata(content-type=application/grpc,request-id=zorax6u-iwt-gzgBXQCL5A,date=Fri, 19 Mar 2021 14:02:21 GMT,alt-svc=h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: null
Failure message: [FAILED toString()]
Status: Status{code=INVALID_ARGUMENT, description=Request contains an invalid argument., cause=null}.
2021-03-19 14:02:21,707 ERROR [TRACEID:  ,SPANID: ] [Gax-832] [] c.g.c.util.concurrent.AbstractFuture    : RuntimeException while executing runnable CallbackListener{com.google.api.core.ApiFutures$1@67a0a9b9} with executor MoreExecutors.directExecutor()
java.lang.RuntimeException: Generated message class "com.google.ads.googleads.v6.errors.ErrorLocation$FieldPathElement" missing method "getIndexCase".

As you can see the above errors doesn't print any request and response, but we have logging enabled, for instance another error below is much more descriptive:

2021-03-19 14:02:20,239 INFO  [TRACEID:  ,SPANID: ] [Gax-836] [] c.g.ads.googleads.lib.request.detail    : FAILURE REQUEST DETAIL.
Request
-------
MethodName: google.ads.googleads.v6.services.GoogleAdsService/SearchStream
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=REDACTED, login-customer-id=9831940508, x-goog-api-client=gl-java/11.0.3 gapic/ gax/1.57.0 grpc/1.30.2}
Body: customer_id: "5814489715"
query: "SELECT customer_client.id, customer_client.descriptive_name, customer_client.currency_code FROM customer_client WHERE customer_client.hidden = FALSE"


Response
--------
Headers: Metadata(content-type=application/grpc,request-id=6kc6syh819juALEmgMNOGg,date=Fri, 19 Mar 2021 14:02:20 GMT,alt-svc=h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: null
Failure message: errors {
  error_code {
    authorization_error: USER_PERMISSION_DENIED
  }
  message: "User doesn\'t have permission to access customer. Note: If you\'re accessing a client customer, the manager\'s customer id must be set in the \'login-customer-id\' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid"
}

Status: Status{code=PERMISSION_DENIED, description=The caller does not have permission, cause=null}.
2021-03-19 14:02:20,242 DEBUG [TRACEID: c2dc654291147ba8 ,SPANID: c2dc654291147ba8] [scheduling-1] [] c.h.p.g.a.GoogleAdsValidationAspect     : API Exception Thrown
com.google.ads.googleads.v6.errors.GoogleAdsException: errors {
  error_code {
    authorization_error: USER_PERMISSION_DENIED
  }
  message: "User doesn\'t have permission to access customer. Note: If you\'re accessing a client customer, the manager\'s customer id must be set in the \'login-customer-id\' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid"
}

We aren't sure what's going on here in this case, and have been going back and forth with the google Api Support team. They keep insisting that we need to log the errors which we believe we are. Please provide with any suggesting if needed.

Secondly, here is our code and how we are creating the budget:

image

and here is the sample on the google ads api documentation:

image

and this is basically the argument passed in the request:
campaign budget Name is: Create new Campaign GoogleAds#budget
campaign amount micros is: 30000000
campaign budget delivery method is: STANDARD

Thank you,

Armel

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions