当我使用跟进时无法读取未定义的属性“ google”

时间:2019-02-19 23:07:39

标签: dialogflow actions-on-google

当用户登录时,我需要捕获actions_intent_SIGN_IN事件,并将其重定向到登录前触发的事件。

捕获action_intent_SIGN_IN的意图如下:

module.exports = function intentHandlesignin(agent) {
  return new Promise(function (resolve, reject) {
          let conv = agent.conv();
          console.debug('nextIntent : ', conv.data.nextIntent);
          console.debug('AccountNext: ', conv.data.account);
          conv.followup(conv.data.nextIntent,{
            account: conv.data.account,
          });
          agent.add(conv);
          resolve();
        });
      }

这被触发时,我收到以下错误消息:

TypeError: Cannot read property 'google' of undefined
at V2Agent.addActionsOnGoogle_ (/functions/node_modules/dialogflow-fulfillment/src/v2-agent.js:342:24)
at WebhookClient.addResponse_ (/functions/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:279:19)
at WebhookClient.add (/functions/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:254:12)
at /functions/intent-handlesignin.js:24:15
at new Promise (<anonymous>)
at intentHandlesignin (/functions/intent-handlesignin.js:16:12)
at /functions/index.js:124:52
at WebhookClient.handleRequest (/functions/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:313:44)
at exports.dialogflowFirebaseFulfillment.functions.https.onRequest (/functions/index.js:139:15)
at cloudFunction (/functions/node_modules/firebase-functions/lib/providers/https.js:57:9)

据我所知,这是一个最新版本的Dialogflow实现(0.6.1)中已修复的错误,但是并不能解决我的问题。

这里有什么建议吗?我是否以错误的方式使用了后续措施,还是这是一个错误?

0 个答案:

没有答案