codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
229 stars 64 forks source link

Bot says nothing (Botkit connector) #301

Closed mcconejero closed 5 years ago

mcconejero commented 5 years ago

Describe the bug: I use npm run mocha and the test give me a problem that says Bot say nothing

To Reproduce: Use npm run mocha with botium-bindings

Expected behavior: I expect that the test its correct or not. But the test give me that problem

Desktop:

codeforequity-at commented 5 years ago

Pls switch on verbose mode and attach log file here

mcconejero commented 5 years ago
npm info it worked if it ends with ok
npm verb cli [ '/home/mario/.nvm/versions/node/v10.15.3/bin/node',
npm verb cli   '/home/mario/.nvm/versions/node/v10.15.3/bin/npm',
npm verb cli   'run',
npm verb cli   'mocha',
npm verb cli   '-verbose' ]
npm info using npm@6.9.0
npm info using node@v10.15.3
npm verb run-script [ 'premocha', 'mocha', 'postmocha' ]
npm info lifecycle botkit-bot@1.0.0~premocha: botkit-bot@1.0.0
npm info lifecycle botkit-bot@1.0.0~mocha: botkit-bot@1.0.0

> botkit-bot@1.0.0 mocha /home/mario/Desktop/Todo/bot
> mocha spec

  botkit-bot
    1) give me picture

  0 passing (11s)
  1 failing

  1) botkit-bot
       give me picture:
     TranscriptError: Error: give me picture/Line 5: bot says nothing
      at async.waterfall (node_modules/botium-core/src/scripting/Convo.js:214:25)
      at /home/mario/Desktop/Todo/bot/node_modules/async/dist/async.js:473:16
      at next (node_modules/async/dist/async.js:5329:29)
      at /home/mario/Desktop/Todo/bot/node_modules/async/dist/async.js:969:16
      at runConversation (node_modules/botium-core/src/scripting/Convo.js:192:15)
      at async.mapSeries (node_modules/botium-core/src/scripting/Convo.js:383:9)
      at /home/mario/Desktop/Todo/bot/node_modules/async/dist/async.js:1140:9
      at /home/mario/Desktop/Todo/bot/node_modules/async/dist/async.js:473:16
      at iterateeCallback (node_modules/async/dist/async.js:988:17)
      at /home/mario/Desktop/Todo/bot/node_modules/async/dist/async.js:969:16
      at /home/mario/Desktop/Todo/bot/node_modules/async/dist/async.js:1137:13
      at convoStepDone (node_modules/botium-core/src/scripting/Convo.js:258:11)
      at scriptingEvents.onBotStart.then.then (node_modules/botium-core/src/scripting/Convo.js:318:24)

npm verb lifecycle botkit-bot@1.0.0~mocha: unsafe-perm in lifecycle true
npm verb lifecycle botkit-bot@1.0.0~mocha: PATH: /home/mario/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/mario/Desktop/Todo/bot/node_modules/.bin:/home/mario/.nvm/versions/node/v10.15.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
npm verb lifecycle botkit-bot@1.0.0~mocha: CWD: /home/mario/Desktop/Todo/bot
npm info lifecycle botkit-bot@1.0.0~mocha: Failed to exec mocha script
npm verb stack Error: botkit-bot@1.0.0 mocha: `mocha spec`
npm verb stack Exit status 1
npm verb stack     at EventEmitter.<anonymous> (/home/mario/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
npm verb stack     at EventEmitter.emit (events.js:189:13)
npm verb stack     at ChildProcess.<anonymous> (/home/mario/.nvm/versions/node/v10.15.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack     at ChildProcess.emit (events.js:189:13)
npm verb stack     at maybeClose (internal/child_process.js:970:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
npm verb pkgid botkit-bot@1.0.0
npm verb cwd /home/mario/Desktop/Todo/bot
npm verb Linux 4.15.0-50-generic
npm verb argv "/home/mario/.nvm/versions/node/v10.15.3/bin/node" "/home/mario/.nvm/versions/node/v10.15.3/bin/npm" "run" "mocha" "-verbose"
npm verb node v10.15.3
npm verb npm  v6.9.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! botkit-bot@1.0.0 mocha: `mocha spec`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the botkit-bot@1.0.0 mocha script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm timing npm Completed in 11732ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/mario/.npm/_logs/2019-05-30T10_15_03_767Z-debug.log
codeforequity-at commented 5 years ago

please set environment variable DEBUG to botium* and run again - I need more log output. the "bot says nothing" just means that the botkit response hasn't been recognized.

DEBUG=botium* npm test
mcconejero commented 5 years ago
npm info it worked if it ends with ok
npm verb cli [ '/home/mario/.nvm/versions/node/v10.15.3/bin/node',
npm verb cli   '/home/mario/.nvm/versions/node/v10.15.3/bin/npm',
npm verb cli   'run',
npm verb cli   'mocha',
npm verb cli   '-verbose' ]
npm info using npm@6.9.0
npm info using node@v10.15.3
npm verb run-script [ 'premocha', 'mocha', 'postmocha' ]
npm info lifecycle botkit-bot@1.0.0~premocha: botkit-bot@1.0.0
npm info lifecycle botkit-bot@1.0.0~mocha: botkit-bot@1.0.0

> botkit-bot@1.0.0 mocha /home/mario/Desktop/Todo/bot
> mocha spec

  botium-bindings-main Botium Bindings args: { convodirs: [ 'spec/convo' ],
  botium-bindings-main   expandConvos: true,
  botium-bindings-main   expandUtterancesToConvos: false,
  botium-bindings-main   expandScriptingMemoryToConvos: false } +0ms
  botium-BotDriver Loaded Botium configuration file ./botium.json +0ms
  botium-BotDriver BuildCompiler: Capabilites: { PROJECTNAME: 'botkit-bot',
  botium-BotDriver   TEMPDIR: 'botiumwork',
  botium-BotDriver   CLEANUPTEMPDIR: true,
  botium-BotDriver   WAITFORBOTTIMEOUT: 10000,
  botium-BotDriver   SIMULATE_WRITING_SPEED: false,
  botium-BotDriver   DOCKERCOMPOSEPATH: 'docker-compose',
  botium-BotDriver   DOCKERMACHINEPATH: 'docker-machine',
  botium-BotDriver   DOCKERMACHINE: false,
  botium-BotDriver   DOCKERIMAGE: 'node:boron',
  botium-BotDriver   DOCKERUNIQUECONTAINERNAMES: false,
  botium-BotDriver   DOCKERSYSLOGPORT_RANGE: '47100-47299',
  botium-BotDriver   BOT_HEALTH_STATUS: 200,
  botium-BotDriver   SLACK_PUBLISHPORT_RANGE: '46100-46299',
  botium-BotDriver   FACEBOOK_PUBLISHPORT_RANGE: '46300-46499',
  botium-BotDriver   FACEBOOK_SEND_DELIVERY_CONFIRMATION: true,
  botium-BotDriver   BOTFRAMEWORK_PUBLISHPORT_RANGE: '46500-46699',
  botium-BotDriver   BOTFRAMEWORK_WEBHOOK_PORT: 3978,
  botium-BotDriver   BOTFRAMEWORK_WEBHOOK_PATH: 'api/messages',
  botium-BotDriver   BOTFRAMEWORK_CHANNEL_ID: 'facebook',
  botium-BotDriver   SIMPLEREST_PING_RETRIES: 6,
  botium-BotDriver   SIMPLEREST_PING_TIMEOUT: 10000,
  botium-BotDriver   SIMPLEREST_PING_VERB: 'GET',
  botium-BotDriver   SIMPLEREST_METHOD: 'GET',
  botium-BotDriver   WEBSPEECH_SERVER_PORT: 46050,
  botium-BotDriver   WEBSPEECH_LANGUAGE: 'en-US',
  botium-BotDriver   WEBSPEECH_CLOSEBROWSER: true,
  botium-BotDriver   SCRIPTING_TXT_EOL: '\n',
  botium-BotDriver   SCRIPTING_XLSX_EOL_SPLIT: '\r',
  botium-BotDriver   SCRIPTING_XLSX_EOL_WRITE: '\r\n',
  botium-BotDriver   SCRIPTING_XLSX_STARTROW: 2,
  botium-BotDriver   SCRIPTING_XLSX_STARTCOL: 1,
  botium-BotDriver   SCRIPTING_NORMALIZE_TEXT: true,
  botium-BotDriver   SCRIPTING_ENABLE_MEMORY: false,
  botium-BotDriver   SCRIPTING_MATCHING_MODE: 'includeLowerCase',
  botium-BotDriver   SCRIPTING_UTTEXPANSION_MODE: 'all',
  botium-BotDriver   SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
  botium-BotDriver   SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
  botium-BotDriver   RETRY_USERSAYS_ONERROR_REGEXP: [],
  botium-BotDriver   RETRY_USERSAYS_NUMRETRIES: 1,
  botium-BotDriver   RETRY_USERSAYS_FACTOR: 1,
  botium-BotDriver   RETRY_USERSAYS_MINTIMEOUT: 1000,
  botium-BotDriver   ASSERTERS: [],
  botium-BotDriver   LOGIC_HOOKS: [],
  botium-BotDriver   USER_INPUTS: [],
  botium-BotDriver   CONTAINERMODE: 'botkit',
  botium-BotDriver   BOTKIT_SERVER_URL: 'http://localhost:3000' } +2ms
  botium-ScriptingProvider Using matching mode: includeLowerCase +0ms
  botium-asserterUtils Loaded Default asserter - [ 'BUTTONS',
  botium-asserterUtils   'MEDIA',
  botium-asserterUtils   'PAUSE_ASSERTER',
  botium-asserterUtils   'ENTITIES',
  botium-asserterUtils   'ENTITY_VALUES',
  botium-asserterUtils   'INTENT',
  botium-asserterUtils   'INTENT_CONFIDENCE' ] +0ms
  botium-asserterUtils Loaded Default logic hook - [ 'PAUSE',
  botium-asserterUtils   'WAITFORBOT',
  botium-asserterUtils   'SET_SCRIPTING_MEMORY',
  botium-asserterUtils   'CLEAR_SCRIPTING_MEMORY',
  botium-asserterUtils   'INCLUDE' ] +0ms
  botium-asserterUtils Loaded Default user input - [ 'BUTTON', 'MEDIA', 'FORM' ] +1ms
  botium-ScriptingProvider ReadConvosFromDirectory(spec/convo) found filenames: give_me_a_picture.convo.txt +8ms
  botium-ScriptingProvider ReadConvosFromDirectory(spec/convo) found convos:
  botium-ScriptingProvider  1 give me picture ({ convoDir: 'spec/convo',
  botium-ScriptingProvider   filename: 'give_me_a_picture.convo.txt' }): Line 3: #me - Hello, Bot! | Line 5: #bot - You said: Hello, Bot! | Line 7: #me - give me a picture | Line 9: #bot - Here is a picture MEDIA(http://www.botium.at/img/logo.png) +4ms
  botium-ScriptingProvider ReadConvosFromDirectory(spec/convo) found utterances:
  botium-ScriptingProvider  none +0ms
  botium-ScriptingProvider ReadConvosFromDirectory(spec/convo) found partial convos:
  botium-ScriptingProvider  none +0ms
  botium-ScriptingProvider ReadConvosFromDirectory(spec/convo) scripting memories:
  botium-ScriptingProvider  none +0ms
  botium-ScriptingProvider ExpandConvos - Using utterances expansion mode: all +1ms
  botium-bindings-main ready reading convos and utterances, number of test cases: (1). +317ms
  botium-bindings-main adding test case 1 give me picture +0ms

  botkit-bot
  botium-BotDriver Build - Botium Core Version: 1.4.14 +322ms
  botium-BotDriver Build - Capabilites: { PROJECTNAME: 'botkit-bot',
  botium-BotDriver   TEMPDIR: 'botiumwork',
  botium-BotDriver   CLEANUPTEMPDIR: true,
  botium-BotDriver   WAITFORBOTTIMEOUT: 10000,
  botium-BotDriver   SIMULATE_WRITING_SPEED: false,
  botium-BotDriver   DOCKERCOMPOSEPATH: 'docker-compose',
  botium-BotDriver   DOCKERMACHINEPATH: 'docker-machine',
  botium-BotDriver   DOCKERMACHINE: false,
  botium-BotDriver   DOCKERIMAGE: 'node:boron',
  botium-BotDriver   DOCKERUNIQUECONTAINERNAMES: false,
  botium-BotDriver   DOCKERSYSLOGPORT_RANGE: '47100-47299',
  botium-BotDriver   BOT_HEALTH_STATUS: 200,
  botium-BotDriver   SLACK_PUBLISHPORT_RANGE: '46100-46299',
  botium-BotDriver   FACEBOOK_PUBLISHPORT_RANGE: '46300-46499',
  botium-BotDriver   FACEBOOK_SEND_DELIVERY_CONFIRMATION: true,
  botium-BotDriver   BOTFRAMEWORK_PUBLISHPORT_RANGE: '46500-46699',
  botium-BotDriver   BOTFRAMEWORK_WEBHOOK_PORT: 3978,
  botium-BotDriver   BOTFRAMEWORK_WEBHOOK_PATH: 'api/messages',
  botium-BotDriver   BOTFRAMEWORK_CHANNEL_ID: 'facebook',
  botium-BotDriver   SIMPLEREST_PING_RETRIES: 6,
  botium-BotDriver   SIMPLEREST_PING_TIMEOUT: 10000,
  botium-BotDriver   SIMPLEREST_PING_VERB: 'GET',
  botium-BotDriver   SIMPLEREST_METHOD: 'GET',
  botium-BotDriver   WEBSPEECH_SERVER_PORT: 46050,
  botium-BotDriver   WEBSPEECH_LANGUAGE: 'en-US',
  botium-BotDriver   WEBSPEECH_CLOSEBROWSER: true,
  botium-BotDriver   SCRIPTING_TXT_EOL: '\n',
  botium-BotDriver   SCRIPTING_XLSX_EOL_SPLIT: '\r',
  botium-BotDriver   SCRIPTING_XLSX_EOL_WRITE: '\r\n',
  botium-BotDriver   SCRIPTING_XLSX_STARTROW: 2,
  botium-BotDriver   SCRIPTING_XLSX_STARTCOL: 1,
  botium-BotDriver   SCRIPTING_NORMALIZE_TEXT: true,
  botium-BotDriver   SCRIPTING_ENABLE_MEMORY: false,
  botium-BotDriver   SCRIPTING_MATCHING_MODE: 'includeLowerCase',
  botium-BotDriver   SCRIPTING_UTTEXPANSION_MODE: 'all',
  botium-BotDriver   SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
  botium-BotDriver   SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
  botium-BotDriver   RETRY_USERSAYS_ONERROR_REGEXP: [],
  botium-BotDriver   RETRY_USERSAYS_NUMRETRIES: 1,
  botium-BotDriver   RETRY_USERSAYS_FACTOR: 1,
  botium-BotDriver   RETRY_USERSAYS_MINTIMEOUT: 1000,
  botium-BotDriver   ASSERTERS: [],
  botium-BotDriver   LOGIC_HOOKS: [],
  botium-BotDriver   USER_INPUTS: [],
  botium-BotDriver   CONTAINERMODE: 'botkit',
  botium-BotDriver   BOTKIT_SERVER_URL: 'http://localhost:3000' } +1ms
  botium-BotDriver Build - Sources : { LOCALPATH: '.',
  botium-BotDriver   GITPATH: 'git',
  botium-BotDriver   GITBRANCH: 'master',
  botium-BotDriver   GITDIR: '.' } +0ms
  botium-BotDriver Build - Envs : { IS_BOTIUM_CONTAINER: true } +0ms
  botium-PluginConnectorContainer Invalid Botium plugin loaded from botkit, expected PluginVersion, PluginClass fields +0ms
  botium-PluginConnectorContainer Botium plugin botium-connector-botkit loaded +1ms
  botium-connector-botkit Validate called +0ms
  botium-connector-botkit Start called +8ms
  botium-connector-botkit success on url check http://localhost:3000 +41ms
  botium-bindings-main running testcase1 give me picture +650ms
  botium-Convo give me picture/Line 3: user says {
  botium-Convo   "sender": "me",
  botium-Convo   "channel": null,
  botium-Convo   "messageText": "Hello, Bot!",
  botium-Convo   "stepTag": "Line 3",
  botium-Convo   "not": false,
  botium-Convo   "asserters": [],
  botium-Convo   "logicHooks": [],
  botium-Convo   "userInputs": []
  botium-Convo } +0ms
  botium-connector-botkit UserSays called { conversation:
  botium-connector-botkit    [ ConvoStep {
  botium-connector-botkit        sender: 'me',
  botium-connector-botkit        channel: null,
  botium-connector-botkit        messageText: 'Hello, Bot!',
  botium-connector-botkit        sourceData: undefined,
  botium-connector-botkit        stepTag: 'Line 3',
  botium-connector-botkit        not: false,
  botium-connector-botkit        asserters: [],
  botium-connector-botkit        logicHooks: [],
  botium-connector-botkit        userInputs: [] },
  botium-connector-botkit      ConvoStep {
  botium-connector-botkit        sender: 'bot',
  botium-connector-botkit        channel: null,
  botium-connector-botkit        messageText: 'You said: Hello, Bot!',
  botium-connector-botkit        sourceData: undefined,
  botium-connector-botkit        stepTag: 'Line 5',
  botium-connector-botkit        not: false,
  botium-connector-botkit        asserters: [],
  botium-connector-botkit        logicHooks: [],
  botium-connector-botkit        userInputs: [] },
  botium-connector-botkit      ConvoStep {
  botium-connector-botkit        sender: 'me',
  botium-connector-botkit        channel: null,
  botium-connector-botkit        messageText: 'give me a picture',
  botium-connector-botkit        sourceData: undefined,
  botium-connector-botkit        stepTag: 'Line 7',
  botium-connector-botkit        not: false,
  botium-connector-botkit        asserters: [],
  botium-connector-botkit        logicHooks: [],
  botium-connector-botkit        userInputs: [] },
  botium-connector-botkit      ConvoStep {
  botium-connector-botkit        sender: 'bot',
  botium-connector-botkit        channel: null,
  botium-connector-botkit        messageText: 'Here is a picture',
  botium-connector-botkit        sourceData: undefined,
  botium-connector-botkit        stepTag: 'Line 9',
  botium-connector-botkit        not: false,
  botium-connector-botkit        asserters: [Array],
  botium-connector-botkit        logicHooks: [],
  botium-connector-botkit        userInputs: [] } ],
  botium-connector-botkit   currentStepIndex: -1,
  botium-connector-botkit   scriptingMemory: {},
  botium-connector-botkit   sender: 'me',
  botium-connector-botkit   channel: null,
  botium-connector-botkit   messageText: 'Hello, Bot!',
  botium-connector-botkit   media: null,
  botium-connector-botkit   buttons: null,
  botium-connector-botkit   cards: null,
  botium-connector-botkit   forms: null,
  botium-connector-botkit   nlp: undefined,
  botium-connector-botkit   sourceData: undefined,
  botium-connector-botkit   sourceAction: undefined,
  botium-connector-botkit   attachments: null } +7ms
  botium-connector-botkit constructed requestOptions {
  botium-connector-botkit   "uri": "http://localhost:3000/botkit/receive",
  botium-connector-botkit   "method": "POST",
  botium-connector-botkit   "json": true,
  botium-connector-botkit   "body": {
  botium-connector-botkit     "text": "Hello, Bot!",
  botium-connector-botkit     "user": "ed079655-5353-432d-8d70-6b5772620de4",
  botium-connector-botkit     "channel": "webhook"
  botium-connector-botkit   }
  botium-connector-botkit } +1ms
  botium-Convo give me picture wait for bot null +10ms
codeforequity-at commented 5 years ago

is this a botkit anywhere server, or just botkit itself ?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.