本文介绍了TypeError:处理程序不是将Firebase和DialogFlow与Google Actions一起使用的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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)

最初,我在google项目上的操作正常,我只是播放了mp3,引用了新用户或老用户,等等,一切正常,然后突然出现了这个错误,尽管我从未编辑过https.js,但我不知道为什么这个错误会导致任何熟悉此错误的人开始?

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?

推荐答案

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

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.

这篇关于TypeError:处理程序不是将Firebase和DialogFlow与Google Actions一起使用的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 21:03