windowsnpmchatbotbotium-box

botium-cli emulator does not work with the rasa connector


When I try to start the emulator for my rasa bot, I get this error. The rasa endpoint url works perfectly fine when I send it a request with curl.

$ botium-cli emulator
Error: Start failed: undefined
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:170:25
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2955:19
    at wrapper (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:268:20)
    at iterateeCallback (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:413:21)
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:321:20
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2953:17
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:130:17

Here's the botium.json

{
  "botium": {
    "Capabilities": {
      "PROJECTNAME": "My Botium Project",
      "CONTAINERMODE": "rasa",
      "RASA_MODE": "DIALOG_AND_NLU",
      "SIMPLEREST_STRICT_SSL" : "false",
      "RASA_ENDPOINT_URL": "https://example.com/webhooks/rest/webhook"
    },
    "Sources": {},
    "Envs": {}
  }
}

Here's the output from the emulator with the verbose tag. Still does not work, maybe it has to do something with the way botium connects to the bot?

$ botium-cli emulator --verbose
2021-03-05T08:17:32.230Z botium-cli Using Botium configuration file ./botium.json
2021-03-05T08:17:32.240Z botium-cli-emulator command options: {
  _: [ 'emulator' ],
  verbose: true,
  v: true,
  convos: [ '.' ],
  C: [ '.' ],
  config: './botium.json',
  c: './botium.json',
  ui: 'console',
  '$0': '..\\..\\AppData\\Roaming\\npm\\node_modules\\botium-cli\\bin\\botium-cli.js'
}
2021-03-05T08:17:32.573Z botium-core-BotDriver Loaded Botium configuration files C:\Users\shivam.sinha\Desktop\rasa check\botium.json
2021-03-05T08:17:33.085Z botium-core-BotDriver Build - Botium Core Version: 1.11.1
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Capabilites: {
  PROJECTNAME: 'My Botium Project',
  TESTSESSIONNAME: 'Botium Test Session',
  TESTCASENAME: 'Botium Test Case',
  TEMPDIR: 'botiumwork',
  CLEANUPTEMPDIR: true,
  WAITFORBOTTIMEOUT: 10000,
  SIMULATE_WRITING_SPEED: false,
  SIMPLEREST_PING_RETRIES: 6,
  SIMPLEREST_PING_TIMEOUT: 10000,
  SIMPLEREST_PING_VERB: 'GET',
  SIMPLEREST_PING_UPDATE_CONTEXT: true,
  SIMPLEREST_STOP_RETRIES: 6,
  SIMPLEREST_STOP_TIMEOUT: 10000,
  SIMPLEREST_STOP_VERB: 'GET',
  SIMPLEREST_START_RETRIES: 6,
  SIMPLEREST_START_TIMEOUT: 10000,
  SIMPLEREST_START_VERB: 'GET',
  SIMPLEREST_POLL_VERB: 'GET',
  SIMPLEREST_POLL_INTERVAL: 1000,
  SIMPLEREST_POLL_UPDATE_CONTEXT: true,
  SIMPLEREST_METHOD: 'GET',
  SIMPLEREST_IGNORE_EMPTY: true,
  SIMPLEREST_TIMEOUT: 10000,
  SIMPLEREST_EXTRA_OPTIONS: {},
  SIMPLEREST_STRICT_SSL: false,
  SIMPLEREST_INBOUND_UPDATE_CONTEXT: true,
  SIMPLEREST_CONTEXT_MERGE_OR_REPLACE: 'MERGE',
  SCRIPTING_TXT_EOL: '\n',
  SCRIPTING_XLSX_EOL_WRITE: '\r\n',
  SCRIPTING_XLSX_HASHEADERS: true,
  SCRIPTING_CSV_SKIP_HEADER: true,
  SCRIPTING_CSV_QUOTE: '"',
  SCRIPTING_CSV_ESCAPE: '"',
  SCRIPTING_NORMALIZE_TEXT: true,
  SCRIPTING_ENABLE_MEMORY: false,
  SCRIPTING_ENABLE_MULTIPLE_ASSERT_ERRORS: false,
  SCRIPTING_MATCHING_MODE: 'wildcardIgnoreCase',
  SCRIPTING_UTTEXPANSION_MODE: 'all',
  SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
  SCRIPTING_UTTEXPANSION_NAMING_MODE: 'justLineTag',
  SCRIPTING_UTTEXPANSION_NAMING_UTTERANCE_MAX: '16',
  SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
  ASSERTERS: [],
  LOGIC_HOOKS: [],
  USER_INPUTS: [],
  SECURITY_ALLOW_UNSAFE: true,
  CONTAINERMODE: 'rasa',
  RASA_MODE: 'DIALOG_AND_NLU',
  RASA_ENDPOINT_URL: 'https://10.60.31.102:8080/webhooks/rest/webhook',
  CONFIG: './botium.json'
}
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Sources : { LOCALPATH: '.', GITPATH: 'git', GITBRANCH: 'master', GITDIR: '.' }
2021-03-05T08:17:33.087Z botium-core-BotDriver Build - Envs : { IS_BOTIUM_CONTAINER: true }
2021-03-05T08:17:33.274Z botium-connector-PluginConnectorContainer-helper Botium plugin botium-connector-rasa loaded. Plugin version is 0.0.7
Error: Start failed: undefined
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:170:25
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2955:19
    at wrapper (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:268:20)
    at iterateeCallback (C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:413:21)
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:321:20
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\node_modules\async\dist\async.js:2953:17
    at C:\Users\shivam.sinha\AppData\Roaming\npm\node_modules\botium-core\src\containers\plugins\SimpleRestContainer.js:130:17

Solution

  • The RASA_ENDPOINT_URL capability has to point to the base URL of your Rasa server - without the /webhooks/rest/webhook path. Botium will build up it's own full url endpoint path based on the RASA_MODE capability:

    {
      "botium": {
        "Capabilities": {
          "PROJECTNAME": "Botium Project Rasa NLU",
          "CONTAINERMODE": "rasa",
          "RASA_MODE": "NLU_INPUT",
          "RASA_ENDPOINT_URL": "https://demo.botiumbox.com/rasa-demo/"
        }
      }
    }