Skip to content

Error : "permission denied on resources" Trying to implement @google-cloud/speech Verison 5.4.1(i.e V2) in Node JS  #4221

@DixitMalia

Description

@DixitMalia

I am writing to request assistance with an issue I have encountered while implementing the Google Speech-to-Text gRPC API in my project. Specifically, I am receiving an error message indicating "permission denied on resources" when attempting to use the API.

I have followed the API documentation and have ensured that my credentials are valid and have the appropriate permissions. However, despite my best efforts, I have been unable to resolve this issue and am currently unable to proceed with my project.

I would greatly appreciate any assistance or guidance you can provide in resolving this issue. Please let me know if there is any additional information I can provide to help diagnose the problem.

Thank you in advance for your help.

OS Verison : Ubuntu 20
Node Verison : 19.8.1
Google Cloud Speech API Veriosn : gRPC 5.4.1 (i.e Verison 2)

ERROR SHOWN BELOW

0|ASR | Error: 7 PERMISSION_DENIED: Permission 'speech.recognizers.list' denied on resource '//speech.googleapis.com/projects/gifted-airway-380611/locations/global' (or it may not exist).
0|ASR | at callErrorFromStatus (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
0|ASR | at Object.onReceiveStatus (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/@grpc/grpc-js/build/src/client.js:192:76)
0|ASR | at Object.onReceiveStatus (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
0|ASR | at Object.onReceiveStatus (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
0|ASR | at /home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/@grpc/grpc-js/build/src/resolving-call.js:94:78
0|ASR | at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
0|ASR | for call at
0|ASR | at ServiceClientImpl.makeUnaryRequest (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/@grpc/grpc-js/build/src/client.js:160:34)
0|ASR | at ServiceClientImpl. (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
0|ASR | at /home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/@google-cloud/speech/build/src/v2/speech_client.js:318:29
0|ASR | at wrappedCall (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/google-gax/build/src/paginationCalls/pagedApiCaller.js:86:20)
0|ASR | at /home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/google-gax/build/src/normalCalls/timeout.js:44:16
0|ASR | at repeat (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/google-gax/build/src/normalCalls/retries.js:80:25)
0|ASR | at Immediate. (/home/ubuntu/telephony/call_ai_asr_main/call_ai_asr/node_modules/google-gax/build/src/normalCalls/retries.js:118:13)
0|ASR | at process.processImmediate (node:internal/timers:480:21) {
0|ASR | code: 7,
0|ASR | details: "Permission 'speech.recognizers.list' denied on resource '//speech.googleapis.com/projects/gifted-airway-380611/locations/global' (or it may not exist).",
0|ASR | metadata: Metadata {
0|ASR | internalRepr: Map(2) {
0|ASR | 'google.rpc.errorinfo-bin' => [Array],
0|ASR | 'grpc-status-details-bin' => [Array]
0|ASR | },
0|ASR | options: {}
0|ASR | },
0|ASR | note: 'Exception occurred in retry method that was not classified as transient',
0|ASR | statusDetails: [
0|ASR | ErrorInfo {
0|ASR | metadata: [Object],
0|ASR | reason: 'IAM_PERMISSION_DENIED',
0|ASR | domain: 'speech.googleapis.com'
0|ASR | }
0|ASR | ],
0|ASR | reason: 'IAM_PERMISSION_DENIED',
0|ASR | domain: 'speech.googleapis.com',
0|ASR | errorInfoMetadata: {
0|ASR | resource: 'projects/gifted-airway-380611/locations/global',
0|ASR | permission: 'speech.recognizers.list'
0|ASR | }
0|ASR | }

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions