Skip to content

Functions timeout due to warning FIREBASE WARNING: Provided authentication credentials for the app named "[DEFAULT]" are invalid. This usually indicates your app was not initialized correctly. Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.  #134

@aminelaadhari

Description

@aminelaadhari

Version info

firebase-functions:
^0.7.3
firebase-tools:
3.15.2
firebase-admin:
^5.5.0

package.json

{
  "name": "backend",
  "dependencies": {
    "@google-cloud/datastore": "^1.1.0",
    "@google-cloud/pubsub": "^0.15.0",
    "amplitude": "^3.5.0",
    "bluebird": "^3.4.7",
    "express": "^4.15.3",
    "firebase-admin": "^5.5.0",
    "firebase-functions": "^0.7.3",
    "jimp": "^0.2.27",
    "moment": "^2.17.1",
    "promise-retry": "^1.1.1",
    "request": "^2.81.0",
    "request-promise": "^4.2.1"
  },
  "private": true
}

Test case

Steps to reproduce

When a function that uses admin.database() is called, we see this warning in the logs:

FIREBASE WARNING: Provided authentication credentials for the app named "[DEFAULT]" are invalid. This usually indicates your app was not initialized correctly. Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project. 

And the function timeouts after 60s.
Happens only in production.

Were you able to successfully deploy your functions?

Yes

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