Botframework-sdk: Getting an exception: Dialog[/] already exists in library[*].

Created on 10 Apr 2018  路  2Comments  路  Source: microsoft/botframework-sdk

Bot Info

  • SDK Platform: Node.js
  • SDK Version: 3.14.1
  • Active Channels: N/A
  • Deployment Environment: local development with Emulator

Issue Description

Getting an exception: Dialog[/] already exists in library[*].

Code Example

var qnarecognizer = new cognitiveservices.QnAMakerRecognizer({
knowledgeBaseId: process.env.QNA_KNOWLEDGEBASE_ID,
subscriptionKey: process.env.QNA_SUBCRIPTION_KEY,
top: 4
});

var model = process.env.LUIS_MODEL_ENDPOINT_URL;
var recognizer = new builder.LuisRecognizer(model);
var intents = new builder.IntentDialog({ recognizers: [recognizer, qnarecognizer] });
bot.dialog('/', intents);

Reproduction Steps

Adding the below line raises the exception
bot.dialog('/', intents);

Expected Behavior

Should work seemlessly

Actual Results

Exception raised.
/node_modules/botbuilder/lib/bots/Library.js:378
throw new Error("Dialog[" + id + "] already exists in library[" + this.name + "].");
^
Error: Dialog[/] already exists in library[*].

Most helpful comment

When declaring the bot (builder.UniversalBot), which overload are you using?

var bot = new builder.UniversalBot(connector);

or

var bot = new builder.UniversalBot(connector, function (session) { 
    // function code here
 });

The second overload creates a default dialog which maps to "/".

All 2 comments

When declaring the bot (builder.UniversalBot), which overload are you using?

var bot = new builder.UniversalBot(connector);

or

var bot = new builder.UniversalBot(connector, function (session) { 
    // function code here
 });

The second overload creates a default dialog which maps to "/".

Closing this issue as there has been no reply for an extended period. If this issue persists, feel free to open a new support request. Thank you.

Was this page helpful?
0 / 5 - 0 ratings