Skip to content

Cloud Storage: "Invalid Credentials" API response for default credentials in Cloud Functions #2527

@shaibt

Description

@shaibt

I have a few Firebase Cloud Functions (all node js of course) calling GCS objects using the @google-cloud/storage SDK for node JS (ver 1.2.1).
For 3 hours today all calls from the function to the GCS API failed with "invalid credentials". Only when I redeployed the function using the firebase CLI did they start working again (no change to the function code). This has never happened before.
This is how the function authenticates:
const gcs = require('@google-cloud/storage')();

Really worrisome I cannot rely on the default authentication within the cloud platform to work. If I explicitly use a service account will this make sure problem doesn't reoccur?

Environment details

  • OS: Firebase/Google Cloud function environment
  • Node.js version: Firebase/Google Cloud function environment
  • google-cloud-node version: 1.2.1

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions