TypeError: handler is not a function using Firebase and DialogFlow with Google Actions

空扰寡人 提交于 2019-12-08 07:56:19

问题


I keep getting this error message in Firebase functions/logs

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)

Originally my actions on google project was working fine, I just got mp3s playing, referencing new user or returning user, etc, everything worked then all of a sudden this error started appearing though I never edited https.js, I have no idea why this error just started anyone familiar with this?


回答1:


For others encountering this error: For me it was an incorrect function registration. I registered my function as a standard https-function with onRequest and tried calling it as a callable function. Changing the registration to use onCall solved this issue.



来源:https://stackoverflow.com/questions/56278788/typeerror-handler-is-not-a-function-using-firebase-and-dialogflow-with-google-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!