question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can not create CampaignBudget on version 5.1.1

See original GitHub issue

After upgrading google-ads-api to 5.1.1, i can not create a campaign budget: If i did not set total_amount_micros, i got error total_amount_micros: Too low If it set total_amount_micros, i got error:

GoogleAdsError {
  error_code: ErrorCode { request_error: 1 },
  message: 'The error code is not in this version.',
  trigger: Value { string_value: '' },
  location: ErrorLocation {
    field_path_elements: [ 
       FieldPathElement { field_name: 'operations', index: 0 },
       FieldPathElement { field_name: 'create' },
       FieldPathElement { field_name: 'total_amount_micros' }
    ]
  }
}

Here is my testing code:

const campaignBudget = new resources.CampaignBudget({
      name: 'TestA1',
      amount_micros: toMicros(500000),
      delivery_method: "STANDARD",
      explicitly_shared: false,
      period: "DAILY",
      // total_amount_micros: toMicros(500000 * 30.4),
      type: "STANDARD",
    });
    const options: MutateOptions = {
      validate_only: true
    };

    try {
      const res = await adsCustomer.Customer.campaignBudgets.create([campaignBudget], options);
    } catch(ex) {}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
wcootscommented, Apr 19, 2021

Hi @nmluancs. We are aware of this issue and are waiting on a fix in the node-js gapic library. Once this has been done we will release with the fix.

3reactions
rosslaverycommented, Apr 20, 2021

Just to chime in that I’m affected by this as well. Also getting other errors for atomic mutations that weren’t there before our migration. We’ve never had to specify fields like final_url_suffix while creating a campaign before.

In the meantime we’ve rolled back to library 4.x.

E.g.:

{
      "error_code": {
        "field_error": "INVALID_VALUE"
      },
      "message": "The field's value is invalid.",
      "trigger": {
        "string_value": ""
      },
      "location": {
        "field_path_elements": [
          {
            "field_name": "mutate_operations",
            "index": 2
          },
          {
            "field_name": "campaign_operation"
          },
          {
            "field_name": "create"
          },
          {
            "field_name": "final_url_suffix"
          }
        ]
      }
    },

Seems like may be related to https://github.com/googleapis/gapic-generator-typescript/issues/848 specifically, since final_url_suffix is marked as optional and gcpic is not honouring it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PowerApps app will not open in Android 5.1.1
Solved: Ive downloaded and installed Powerapps on my Android 5.1.1 device. When I try to open one of the apps I get the...
Read more >
Title 10 Elections - Leadership and Campus Life
Campaign budget : An itemized budget including all campaign expenses and receipts. ... candidate won an election in which the candidate did not...
Read more >
c++ compiler and editor for ipad 5.1.1
Would you like to download this version now. Tap the OK button just below the prompt. FYI,. Not every app you attempt to...
Read more >
Terms of service
If you do not accept the terms and conditions of this Agreement, ... adaptations or versions of the Content, creating derivative works, ...
Read more >
android 5.1.1 wont install apps
I figured it out, I uninstalled Google talk which led to all the issues.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found