-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getSignedUrl with Cloud Functions giving “SigningError: Failure from metadata server” #150
Comments
I tried this using only google-auth-library and was able to reproduce-- issue opened here: googleapis/google-auth-library-nodejs#321. Feel free to subscribe to the issue over there to follow what we figure out. Otherwise, I'll update here when I hear back. |
The issue was resolved upstream in google-auth-library, and is effectively fixed for all new deploys to GCF. Thanks for reporting! |
I resolved this error by adding the "Cloud Functions Service Agent" role to my service account. |
@rscotten Perfect Solution. I meet this issue while using firebase cloud function calling getSignedUrl(). |
Just to make sure I had to add this role (from @rscotten answer) to my "App Engine default service account" |
It fixed my issue by adding following role to default app engine user Service Account Token Creator |
I have same error only when call a lot of promises to call getSignedUrl
}) const values = await Promise.all(listPromisses);` i have 3k promises. |
Like mentioned you have to add it to the default service account as well... When using firebase even when initializing your app using a different "serviceAccountId" I had to add it to the default account to make URL signing work. Life savior change @matjazonline thanks 👍 |
The GCP docs say not to use Service Agent roles on your own Service Accounts.
I looped in GCP support and found the missing role needed was |
Hi,
I noticed an issue when using
@google-cloud/storage
1.6.0, that doesn't exist in 1.5.2.I'm using Google Cloud Functions with
getSignedUrl
to upload files into storage. I was getting this error:When I downgrade to 1.5.2, the issue goes away.
My index.js looks like this:
My package.json looks like this:
After finding out that 1.5.2 works, I did not look further into this. I'm not sure if this was intentional, or if something in GCF needs to get updated. I'm opening this issue in case this is an unknown bug, and to let others know of a workaround.
https://serverfault.com/q/901144/460159
The text was updated successfully, but these errors were encountered: