cloud-functions-emulator icon indicating copy to clipboard operation
cloud-functions-emulator copied to clipboard

Default credentials are not checking project API enablement

Open mbleigh opened this issue 8 years ago • 3 comments
trafficstars

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

  1. Install e.g. @google-cloud/vision API and initialize with default credentials.
  2. Run HTTPS emulation via Firebase CLI.
  3. See error when trying to use Vision API.

Thanks!

mbleigh avatar May 15 '17 20:05 mbleigh

This error should be reported on the issue tracker for the Cloud SDK

jmdobry avatar May 16 '17 17:05 jmdobry

Was this issue ever reported? It's been over a year and this is still not fixed.

merlinnot avatar Nov 27 '18 12:11 merlinnot

I've created one: https://issuetracker.google.com/issues/120462217

merlinnot avatar Dec 04 '18 15:12 merlinnot