Я запускаю свой эмулятор облачной функции в соответствии с документацией здесь:
firebase emulators:start --only functions
Для функций onRequest все выглядит гладко:
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
но не работает, когда есть функции onTrigger:
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.
В чем может быть причина того, что функции onTrigger игнорируются локально? Я убежден, что Firestore может обрабатывать их локально, учитывая ссылку в документации: «Эмулятор облачных функций, который может эмулировать следующие типы функций: ... Функции Cloud Firestore». Я думаю, что onTrigger будет функцией Cloud Firestore, но может сбивать с толку терминологию.