dialogflow / dialogflow-nodejs-client

Node.js SDK for Dialogflow
Apache License 2.0
659 stars 287 forks source link

calling chatbot using apiai.textRequest() genrates error in webhook #111

Open mInzamamMalik opened 5 years ago

mInzamamMalik commented 5 years ago

when using form dialogflow test console it is working fine, but when i call the chatbot using this library it say this error on webhook:

my dialogflow chatbot is on v1, and I'm using dialogflow fulfilment library in webhook

Cannot read property 'source' of undefined
    at V1Agent.processRequest_ (/user_code/node_modules/dialogflow-fulfillment/src/v1-agent.js:104:77)
    at new WebhookClient (/user_code/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:238:17)
    at exports.webhook.functions.https.onRequest (/user_code/index.js:506:20)
    at cloudFunction (/user_code/node_modules/firebase-functions/lib/providers/https.js:57:9)
    at /var/tmp/worker/worker.js:689:7
    at /var/tmp/worker/worker.js:673:9
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)