简体   繁体   中英

IBM watson conversation using facebook chatbot Error Issue

Here is the error i face. Im using ibm botkit-middleware. What could be the error and how should it be solve?

Fatal TypeError: Cannot read property 'output' of undefined
    at Object.<anonymous> (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\bot-facebook.js:45:32)
    at Object.<anonymous> (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\botkit\lib\CoreBot.js:753:28)
    at Object.Botkit.botkit.trigger (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\botkit\lib\CoreBot.js:779:49)
    at C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\botkit\lib\CoreBot.js:866:32
    at Object.bot.findConversation (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\botkit\lib\Facebook.js:103:13)
    at C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\botkit\lib\CoreBot.js:862:21
    at next (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\ware\lib\index.js:82:27)
    at C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\wrap-fn\index.js:121:18
    at C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\botkit-middleware-watson\lib\middleware\index.js:121:9
    at tryCatcher (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\bluebird\js\release\promise.js:693:18)
    at Promise._fulfill (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\bluebird\js\release\promise.js:638:18)
    at Promise._resolveCallback (C:\Users\User\Desktop\botkit-middleware-master3\examples\multi-bot\node_modules\bluebird\js\release\promise.js:432:57)

You need to debug your code, but the likely cause is that the returning response you get back is invalid, or no call was made prior to reading the response.

The error:

Fatal TypeError: Cannot read property 'output' of undefined

output is a JSON object that is returned in the response.

Obvious errors

  • Service username/password is wrong.
  • Workspace ID is wrong.
  • URL was not specified if your conversation service is not in the US. Most sample code assumes it runs in the US.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM