-
Notifications
You must be signed in to change notification settings - Fork 591
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
Comments
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
|
We haven't required the project ID to be provided up front, as not all libraries require it. We don't require 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: |
(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) |
ping @JustinBeckwith |
Good news everyone! With @alexander-fenster's recent change, this is fixed :) |
[Google internal issue: b/79633878]
Original report for DLP samples from @fhinkel:
This command work (use your project ID and key):
This command does not:
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/orGCLOUD_PROJECT
and throw meaningful exception if it's unset? Do other languages do that?@JustinBeckwith @theacodes @crwilcox
The text was updated successfully, but these errors were encountered: