0

I have setted package.json file.

"scripts": {
    "start": "set GOOGLE_APPLICATION_CREDENTIALS=/My Path/my.json && node app.js"
},

but, I have a Error like this,

(node:28590) UnhandledPromiseRejectionWarning: Error: 7 PERMISSION_DENIED: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the speech.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/. If you are getting this error with curl or similar tools, you may need to specify 'X-Goog-User-Project' HTTP header for quota and billing purposes. For more information regarding 'X-Goog-User-Project' header, please check https://cloud.google.com/apis/docs/system-parameters.
at Object.callErrorFromStatus (/Users/bruce/Workspace/amosense/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
at Object.onReceiveStatus (/Users/bruce/Workspace/amosense/node_modules/@grpc/grpc-js/build/src/client.js:179:52)
at Object.onReceiveStatus (/Users/bruce/Workspace/amosense/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
at Object.onReceiveStatus (/Users/bruce/Workspace/amosense/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
at /Users/bruce/Workspace/amosense/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78
at processTicksAndRejections (internal/process/task_queues.js:77:11)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:28590) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:28590) [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.

I've tried following the guide below, but I'm still getting the same error as above. similar issues

Strangely, it works fine on the server, but keeps getting an error on localhost. I hope someone can guide me.

Thanks.

Bruce.Kwon
  • 17
  • 4
  • Are the same operating systems on server and local machine? – vitooh Sep 29 '21 at 07:25
  • @vitooh server is google cloud, my local machine is macos. – Bruce.Kwon Oct 06 '21 at 06:55
  • I have seen this issue already, but I cannot find an example. Can you post some example code? What do you mean "server is google cloud"? is it vm? app engine? anything else? – vitooh Oct 15 '21 at 10:46
  • @vitooh Thank you for your concern. 'google cloud is app engine(e.g google STT) – Bruce.Kwon Oct 18 '21 at 09:17
  • I am not able to replicate the issue, but I do not have macos available. Are you able to create some minimal example? code and `package,json`? – vitooh Oct 25 '21 at 11:11

0 Answers0