Hi all. I'm always got this error.
import * as restify from 'restify';
import {config} from './Services/Config';
import * as builder from 'botbuilder';
import {gitlabNotifyHandler} from "./Commands/Gitlab/Notify";
import {IntentDialog, Session} from "botbuilder";
import {SkypeLuisRecognizer} from "./Services/LuisRecognizer";
import {helpDialog} from "./Commands/Interaction/HelpDialog";
import {contactSyncHelper} from "./Helpers/ContactSync";
import {noneDialog} from "./Commands/Interaction/NoneDialog";
const server = restify.createServer();
server.listen(config.getServer().getPort(), () => {
console.log(`Listen: ${config.getServer().getPort()}`);
});
const connector = new builder.ChatConnector({
appId: config.getSkypeBot().getId(),
appPassword: config.getSkypeBot().getPassword()
});
const bot = new builder.UniversalBot(connector);
server.post('/api/messages', connector.listen());
server.get('/gitlab/notify/text/:text', gitlabNotifyHandler(bot));
bot.on('incoming', contactSyncHelper);
let intents = new IntentDialog({
recognizers: [SkypeLuisRecognizer],
recognizeOrder: builder.RecognizeOrder.series
})
.matches('Help', [helpDialog])
.matches('None',[noneDialog]);
bot.dialog('/', intents);
Dialog must run
/home/user/Projects/Pet/skype-bot-ci/node_modules/promise/lib/done.js:10
throw err;
^
TypeError: Cannot read property 'logger' of undefined
at UniversalBot.Library.findActiveDialogRoutes (/home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/Library.js:135:20)
at /home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/Library.js:243:31
at /home/user/Projects/Pet/skype-bot-ci/node_modules/async/lib/async.js:718:13
at async.forEachOf.async.eachOf (/home/user/Projects/Pet/skype-bot-ci/node_modules/async/lib/async.js:233:13)
at _parallel (/home/user/Projects/Pet/skype-bot-ci/node_modules/async/lib/async.js:717:9)
at Object.async.parallel (/home/user/Projects/Pet/skype-bot-ci/node_modules/async/lib/async.js:731:9)
at /home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/Library.js:241:23
at UniversalBot.Library.recognize (/home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/Library.js:68:13)
at UniversalBot.Library.defaultFindRoutes (/home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/Library.js:236:14)
at UniversalBot.Library.findRoutes (/home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/Library.js:85:18)
at /home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/UniversalBot.js:374:21
at /home/user/Projects/Pet/skype-bot-ci/node_modules/async/lib/async.js:181:20
at Object.async.forEachOf.async.eachOf (/home/user/Projects/Pet/skype-bot-ci/node_modules/async/lib/async.js:233:13)
at Object.async.forEach.async.each (/home/user/Projects/Pet/skype-bot-ci/node_modules/async/lib/async.js:209:22)
at /home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/UniversalBot.js:373:19
at UniversalBot.Library.recognize (/home/user/Projects/Pet/skype-bot-ci/node_modules/botbuilder/lib/bots/Library.js:68:13)
Duplicate of #2846, ctx not declared when called in else statement. Fix filed in PR #3128.
Closing this issue for now, feel free to reopen if the PR does not resolve it