PERMISSION_DENIED: The caller does not have permission
See original GitHub issueHy there! How are you?
I’m developing a Google Cloud Function and it is great! But since last week I’m getting an issue testing locally with functions-framework-nodejs
Unhandled rejection
Error: 7 PERMISSION_DENIED: The caller does not have permission
at Object.callErrorFromStatus (/home/user/project/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
at Object.onReceiveStatus (/home/user/project/node_modules/@grpc/grpc-js/build/src/client.js:176:52)
at Object.onReceiveStatus (/home/user/project/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:342:141)
at Object.onReceiveStatus (/home/user/project/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:305:181)
at Http2CallStream.outputStatus (/home/user/project/node_modules/@grpc/grpc-js/build/src/call-stream.js:117:74)
at Http2CallStream.maybeOutputStatus (/home/user/project/node_modules/@grpc/grpc-js/build/src/call-stream.js:156:22)
at Http2CallStream.endCall (/home/user/project/node_modules/@grpc/grpc-js/build/src/call-stream.js:142:18)
at Http2CallStream.handleTrailers (/home/user/project/node_modules/@grpc/grpc-js/build/src/call-stream.js:274:14)
at ClientHttp2Stream.emit (events.js:198:13)
at ClientHttp2Stream.EventEmitter.emit (domain.js:466:23)
Error: Process exited with code 16
at process.on.code (/home/user/project/node_modules/@google-cloud/functions-framework/build/src/invoker.js:271:38)
at process.emit (events.js:198:13)
at process.EventEmitter.emit (domain.js:448:20)
at process.exit (internal/process/per_thread.js:168:15)
at Object.logAndSendError (/home/user/project/node_modules/@google-cloud/functions-framework/build/src/logger.js:37:9)
at process.on.err (/home/user/project/node_modules/@google-cloud/functions-framework/build/src/invoker.js:268:22)
at process.emit (events.js:198:13)
at process.EventEmitter.emit (domain.js:448:20)
at emitPromiseRejectionWarnings (internal/process/promises.js:140:18)
at process._tickCallback (internal/process/next_tick.js:69:34)
error Command failed with exit code 16.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
It occurs at the end of the execution of the function.
Any clue of what it is?
Version: “@google-cloud/functions-framework”: “^1.6.0”
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
PERMISSION_DENIED: The caller does not have permission
The error I was getting was: PERMISSION_DENIED: Caller does not have required permission to use project project:random-id-11111.
Read more >(Status(StatusCode="PermissionDenied", Detail="The caller ...
(Status(StatusCode="PermissionDenied", Detail="The caller does not have permission")) error when running C# examples. 70 views.
Read more >The caller does not have permission to execute the specified ...
Hi I'am trying to create a document in a sub collection named "locations_favorites" who reference a collection named "locations" but the following ...
Read more >Permission denied when deploying queue.yaml [137078982]
ERROR: (gcloud.app.deploy) PERMISSION_DENIED: The caller does not have permission ... The service account has the following permissions: App Engine Admin
Read more >Troubleshooting - Profiler - Google Cloud
failed to create a profile, will retry: rpc error: code = PermissionDenied desc = The caller does not have permission. To resolve this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tried to isolate some parts of the code and it seems to be LogginWinston it’s causing the error, when i comment the “loggingWinston” on the creation of the logger, it works just fine. I dont know if there’s a relation with the function framework.
Thanks!
code:
Hi there! I think i found out the problem, it’s not really a problem, but sure it seems to in the @google-cloud/logging-winston.
It was missing a permission for the Logging API on the service account. I think just the message it wasn’t much clear.
But the code is right here:
https://github.com/denisdnc/cloud-functions-example
Set a service account credentials path:
And start the app:
Do the request on http://localhost:8080/
Then should log the problem above.
Thank you guys for the support!