Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad error reporting if environment variables are not set #2843

Closed
alexander-fenster opened this issue Jun 29, 2018 · 5 comments
Closed

bad error reporting if environment variables are not set #2843

alexander-fenster opened this issue Jun 29, 2018 · 5 comments
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@alexander-fenster
Copy link
Contributor

alexander-fenster commented Jun 29, 2018

[Google internal issue: b/79633878]

Original report for DLP samples from @fhinkel:

This command work (use your project ID and key):

GCLOUD_PROJECT=long-door-651 GOOGLE_APPLICATION_CREDENTIALS=~/keys/dlp.json node deid.js deidMask "My SSN is 372819127"
My SSN is *******

This command does not:

node deid.js deidMask "My SSN is 372819127" -m x -n 5

/tmp/dlp/nodejs-dlp/samples/node_modules/yargs/yargs.js:1100
else throw err
^

Basically, our code requires GOOGLE_APPLICATION_CREDENTIALS environment variable to be set (it can be traced deep to gRPC internals https://github.com/grpc/grpc/blob/356d491245aebd12295c418f4ef1a1451b35203a/include/grpc/grpc_security_constants.h#L43), and we never report any good error if this variable is unset.

We also require GCLOUD_PROJECT to be set (used in google-auth-library-nodejs: https://github.com/google/google-auth-library-nodejs/blob/ccec6248bb260b73c29f47178679cddcb71a1263/src/auth/googleauth.ts#L566) but I'm not sure if it's required or optional.

Do you think the client library should check for GOOGLE_APPLICATION_CREDENTIALS and/or GCLOUD_PROJECT and throw meaningful exception if it's unset? Do other languages do that?

@JustinBeckwith @theacodes @crwilcox

@crwilcox
Copy link
Contributor

In Python, if the constructor for the client is missing credentials we search for credentials in the usual places. If it fails to find it

>>> google.cloud.speech.SpeechClient()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/crwilcox/scratch/google-cloud-speech-python/env3/lib/python3.6/site-packages/google/cloud/speech_v1/gapic/speech_client.py", line 84, in __init__
    scopes=self._DEFAULT_SCOPES,
  File "/Users/crwilcox/scratch/google-cloud-speech-python/env3/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 170, in create_channel
    credentials, _ = google.auth.default(scopes=scopes)
  File "/Users/crwilcox/scratch/google-cloud-speech-python/env3/lib/python3.6/site-packages/google/auth/_default.py", line 306, in default
    raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application. For more information, please see https://developers.google.com/accounts/docs/application-default-credentials.

@JustinBeckwith JustinBeckwith added triage me I really want to be triaged. 🚨 This issue needs some love. labels Jun 30, 2018
@stephenplusplus
Copy link
Contributor

We haven't required the project ID to be provided up front, as not all libraries require it. We don't require GOOGLE_APPLICATION_CREDENTIALS either, because the user could have provided a credentials object or keyFilename path to a service account JSON/PEM/P12 key file. We let our first API call determine if there's a problem, which is usually the auth library which relays the message that you need to provide credentials.

The GAPIC/gax constructor logic has had a long-standing problem, where it logs an error so many times:

$ node
> DLP = require('@google-cloud/dlp')
{ DlpServiceClient: [Function: DlpServiceClient],
  v2: [Circular],
  default:
   { DlpServiceClient: [Function: DlpServiceClient],
     v2: [Circular] } }
> dlp = new DLP.DlpServiceClient()
DlpServiceClient {
  _descriptors:
   { page:
      { listInspectTemplates: [Object],
        listDeidentifyTemplates: [Object],
        listDlpJobs: [Object],
        listJobTriggers: [Object] } },
  auth:
   GoogleAuth {
     getProjectId: [Function],
     checkIsGCE: undefined,
     jsonContent: null,
     cachedCredential: null,
     _cachedProjectId: null,
     keyFilename: undefined,
     scopes: [ 'https://www.googleapis.com/auth/cloud-platform' ] },
  _pathTemplates:
   { organizationPathTemplate: organizations/{organization=*},
     organizationDeidentifyTemplatePathTemplate: organizations/{organization=*}/deidentifyTemplates/{deidentify_template=*},
     projectDeidentifyTemplatePathTemplate: projects/{project=*}/deidentifyTemplates/{deidentify_template=*},
     organizationInspectTemplatePathTemplate: organizations/{organization=*}/inspectTemplates/{inspect_template=*},
     projectInspectTemplatePathTemplate: projects/{project=*}/inspectTemplates/{inspect_template=*},
     projectJobTriggerPathTemplate: projects/{project=*}/jobTriggers/{job_trigger=*},
     projectPathTemplate: projects/{project=*},
     dlpJobPathTemplate: projects/{project=*}/dlpJobs/{dlp_job=*} },
  _innerApiCalls:
   { inspectContent: [Function: apiCallInner],
     redactImage: [Function: apiCallInner],
     deidentifyContent: [Function: apiCallInner],
     reidentifyContent: [Function: apiCallInner],
     listInfoTypes: [Function: apiCallInner],
     createInspectTemplate: [Function: apiCallInner],
     updateInspectTemplate: [Function: apiCallInner],
     getInspectTemplate: [Function: apiCallInner],
     listInspectTemplates: [Function: apiCallInner],
     deleteInspectTemplate: [Function: apiCallInner],
     createDeidentifyTemplate: [Function: apiCallInner],
     updateDeidentifyTemplate: [Function: apiCallInner],
     getDeidentifyTemplate: [Function: apiCallInner],
     listDeidentifyTemplates: [Function: apiCallInner],
     deleteDeidentifyTemplate: [Function: apiCallInner],
     createDlpJob: [Function: apiCallInner],
     listDlpJobs: [Function: apiCallInner],
     getDlpJob: [Function: apiCallInner],
     deleteDlpJob: [Function: apiCallInner],
     cancelDlpJob: [Function: apiCallInner],
     listJobTriggers: [Function: apiCallInner],
     getJobTrigger: [Function: apiCallInner],
     deleteJobTrigger: [Function: apiCallInner],
     updateJobTrigger: [Function: apiCallInner],
     createJobTrigger: [Function: apiCallInner] } }
> (node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 3)
(node:26396) [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.
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 4)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 5)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 6)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 7)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 8)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 9)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 10)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 11)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 12)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 13)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 14)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 15)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 16)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 17)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 18)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 19)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 20)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 21)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 22)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 23)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 24)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 25)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 26)
(node:26396) UnhandledPromiseRejectionWarning: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
    at GoogleAuth.<anonymous> (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:248:31)
    at step (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:47:23)
    at Object.next (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:28:53)
    at fulfilled (C:\Users\sawch\dev\play\gcloud-1530817255\node_modules\google-auth-library\build\src\auth\googleauth.js:19:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
(node:26396) 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: 27)

So, it kind of requires auth information, and it doesn't tell you very nicely. I don't think we should require (for the reasons stated above), but we should obviously clean the errors out.

Directly related issues:

@stephenplusplus stephenplusplus added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Jul 5, 2018
@JustinBeckwith JustinBeckwith added 🚨 This issue needs some love. triage me I really want to be triaged. labels Jul 5, 2018
@stephenplusplus stephenplusplus removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Jul 5, 2018
@stephenplusplus
Copy link
Contributor

(this isn't a bug here, but could be a bug in the DLP samples... @JustinBeckwith feel free to take the final word on how to handle this issue)

@JustinBeckwith JustinBeckwith added triage me I really want to be triaged. 🚨 This issue needs some love. labels Jul 5, 2018
@JustinBeckwith JustinBeckwith added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Jul 13, 2018
@JustinBeckwith JustinBeckwith added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Jul 23, 2018
@JustinBeckwith JustinBeckwith added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Aug 2, 2018
@JustinBeckwith JustinBeckwith added the 🚨 This issue needs some love. label Aug 10, 2018
@fhinkel
Copy link
Contributor

fhinkel commented Sep 14, 2018

ping @JustinBeckwith

@JustinBeckwith
Copy link
Contributor

Good news everyone! With @alexander-fenster's recent change, this is fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

5 participants