googleapis/google-auth-library-nodejs

Forbidden error from Cloud Function

shinzui opened this issue · 9 comments

Hi,

I followed the official code sample to decrypt from google cloud function but I am getting the following authentication error:

Error: function execution failed.Details:
A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified. Could not refresh access token.

My App Engine default service account has the correct role. Any hint where to look to figure out the root cause of the error?

We spent the day on this and ended up solving the problem by downgrading googleapis package from version 25.0.0 to 23.0.2.

I have this error after the release of google-auth-library 1.2.0. Fixing the version of this package in my package.json to 1.1.0 removed the problem for me.

Greetings folks! Sorry for the trouble. I can confirm that this was broken in the 0.12 -> 1.0 release. I don't know the root cause yet, but I'm looking at it.

Ok I was wrong :) . This was introduced in the 1.2 release with #269. GCE / GKE / GAE Flex all have a metadata server that will respond both on /v1beta1 and /v1. It looks like Cloud Functions only responds to /v1beta1 :( We'll revert that change, poke the GCF team, and cut a new release with the fix soon. Sorry folks!

I am getting this error. Please any fix :

Error occurred: { Error: A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified

Greetings! Please open a new issue, including a code sample 😀

Hi, I was trying to access my google cloud project by using googleapis send from firebase function.
Basically, I am using ML engine to get the prediction back from my model.
Is there a way to allow all users for having a permission to access ?

I am using similar code found here : googleapis/nodejs-storage#214