Thingamajig
Thingamajig

Reputation: 4465

Troubleshooting ignored functions for Firebase emulator

I'm starting my cloud function emulator according to the documentation here:

firebase emulators:start --only functions

Things look smooth for the onRequest functions:

i  Starting emulators: ["functions"]
⚠  Your requested "node" version "8" doesn't match your global version "10"
✔  functions: Emulator started at http://localhost:5001
i  functions: Watching "/Users/.../functions" for Cloud Functions...
i  functions: HTTP trigger initialized at http://localhost:5001/sweever-prod/us-central1/sendMailTrigger
i  functions: HTTP trigger initialized at http://localhost:5001/sweever-prod/us-central1/sitemapData

but falls flat when there are onTrigger functions:

Ignoring trigger "newUserSignedUp" because the Cloud Firestore emulator is not running.
Ignoring trigger "newItemAdded" because the Cloud Firestore emulator is not running.
Ignoring trigger "itemUpdated" because the Cloud Firestore emulator is not running.

What might the cause of onTrigger functions being ignored locally? I'm led to believe Firestore can handle these locally given the documentation's reference: "Cloud Functions emulator which can emulate the following function types: ... Cloud Firestore functions." I think the onTrigger would be a Cloud Firestore function but might be confusing the terminology.

Upvotes: 1

Views: 1672

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317322

If you want to run the emulators for multiple products (Hosting and Firestore), you should be starting the emulator with the command:

firebase emulators:start

Right now, you are just starting the emulator for functions that don't involve Firestore. Please refer to the documentation for more information.

Upvotes: 2

Related Questions