google-cloud-functions - 类型错误 : handler is not a function using Firebase and DialogFlow with Google Actions

标签 google-cloud-functions dialogflow-es actions-on-google

我不断在 Firebase 函数/日志中收到此错误消息

dialogflowFirebaseFulfillment
 TypeError: handler is not a function
    at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:57:9)
    at /worker/worker.js:783:7
    at /worker/worker.js:766:11
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickDomainCallback (internal/process/next_tick.js:219:9)

最初我在 google 项目上的操作工作正常,我只是播放 mp3,引用新用户或返回用户等,一切正常然后突然这个错误开始出现虽然我从未编辑过 https.js,我没有知道为什么这个错误刚刚开始任何熟悉这个的人吗?

最佳答案

对于遇到此错误的其他人:对我来说,这是错误的函数注册。我使用 onRequest 将我的函数注册为标准 https 函数,并尝试将其作为可调用函数调用。将注册更改为使用 onCall 解决了这个问题。

关于google-cloud-functions - 类型错误 : handler is not a function using Firebase and DialogFlow with Google Actions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56278788/

相关文章:

java - DialogFlow Google Assistant 的正确履行消息格式

firebase - 使用 Cloud Functions/Admin SDK 在 Google Firestore 和 Google Sheets 之间同步数据

javascript - 从 Cloud Functions for Firebase 中的数据库触发器获取用户 ID?

javascript - Firebase 使用 onCreate 部署获取 ID 以获取推送通知

firebase - 有没有办法在 firebase 控制台中查看每个 firebase 函数的调用次数?

dialogflow-es - 在 DialogFlow 中访问 Facebook Messenger 用户配置文件 API

actions-on-google - 如何从我的 webhook 触发 `action.intent.INTENT_NAME` 意图?

dialogflow-es - 我应该使用开发者实体还是用户实体?

firebase-realtime-database - 使用 Google Assistant 更改 Firebase 数据库值

actions-on-google - 获取 Google Assistant Action 以响应 "Quit"或 "Cancel"