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.

functions/billing: test failure with non-actionable messages

See original GitHub issue

Two tests have this same failure state, which prevents effective triage.

  1. The tests need to be fixed
  2. The test needs to surface the underlying error.

Currently blocking merge on #1515

  functions/billing tests
    notifies Slack
      functions_billing_slack
        ✓ should notify Slack when budget is exceeded (868ms)
    disables billing
      functions_billing_stop
(node:61) UnhandledPromiseRejectionWarning: ChildProcessError: Command failed: functions-framework --target=notifySlack --signature-type=event --port 8080
 `functions-framework --target=notifySlack --signature-type=event --port 8080` (exited with error code null)
    at callback (/tmpfs/src/github/nodejs-docs-samples/functions/billing/node_modules/child-process-promise/lib/index.js:33:27)
    at ChildProcess.exithandler (child_process.js:288:5)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:915:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:61) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:61) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
        1) should disable billing when budget is exceeded

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JustinBeckwithcommented, Sep 29, 2020

I think you’re looking for something like this:

const {GoogleAuth} = require('google-auth-library');
const auth = new GoogleAuth({
  scopes: [
    'https://www.googleapis.com/auth/cloud-billing',
    'https://www.googleapis.com/auth/cloud-platform',
  ],
});
google.options({auth});
0reactions
ace-ncommented, Oct 7, 2020

Closing as duplicate of #1988 (which was fixed just now anyway).

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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