cloud-functions-emulator
cloud-functions-emulator copied to clipboard
Default credentials are not checking project API enablement
Description
When trying to use Google Cloud node libraries with default credentials, an error occurs when trying to use e.g. Vision API:
error: Error: Google Cloud Vision API has not been used in project google.com:cloudsdktool before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/vision
.googleapis.com/overview?project=google.com:cloudsdktool then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry. at /.../functions/node_modules/grpc/src/node/src/client.js:434:17
It seems like the credentials should be generated such that API enablement is checked against the target project for emulation, not the cloudsdktool project.
Steps to reproduce
- Install e.g.
@google-cloud/visionAPI and initialize with default credentials. - Run HTTPS emulation via Firebase CLI.
- See error when trying to use Vision API.
Thanks!
This error should be reported on the issue tracker for the Cloud SDK
Was this issue ever reported? It's been over a year and this is still not fixed.
I've created one: https://issuetracker.google.com/issues/120462217