Firebase-functions: TypeError: firestoreInstance.settings is not a function

Created on 31 Jul 2018  路  6Comments  路  Source: firebase/firebase-functions

Version info

firebase-functions:
2.0.2
firebase-tools:
4.0.1
firebase-admin:
5.12.1

Test case

I am not sure. Happen's before any of my code executes

Steps to reproduce

Deploy functions, and provoke a firestore trigger.

Were you able to successfully deploy your functions?

yes

Expected behavior

"Normal" executions of firestore triggers

Actual behavior

This error in the console:

TypeError: firestoreInstance.settings is not a function
    at beforeSnapshotConstructor (/srv/node_modules/firebase-functions/lib/providers/firestore.js:136:27)
    at changeConstructor (/srv/node_modules/firebase-functions/lib/providers/firestore.js:144:49)
    at cloudFunctionNewSignature (/srv/node_modules/firebase-functions/lib/cloud-functions.js:108:28)
    at /worker/worker.js:726:24
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)

screen shot 2018-07-31 at 17 01 07

Most helpful comment

Hi, you need to update firebase-admin to v5.13.0 or above. That is the peer dependency requirement of firebase-functions v2

All 6 comments

Hi, you need to update firebase-admin to v5.13.0 or above. That is the peer dependency requirement of firebase-functions v2

This gets rid of the type warning for that, but settings is a void function whereas firebase() returned a Firebase object and that's what my cloud functions are expecting. What is the correct behaviour here?

I am getting the same error, I've downgraded the firebase-admin to 5.13.0 and still not working

@amirhmk I'm not sure what you mean, could you elaborate further? @felipeblini Do you have firebase-functions v2?

even firebase-admin 6.0.0 still not working

@putraxor Did you run "npm i" locally on your machine? You'll need to do this if you were manually editing package.json.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NikoMontana picture NikoMontana  路  23Comments

stasbar picture stasbar  路  33Comments

m4recek picture m4recek  路  33Comments

malikasinger1 picture malikasinger1  路  50Comments

brianmhunt picture brianmhunt  路  47Comments