Microsoft Bot Emulator "Sorry, my bot code is having an issue", how do I debug this?

Adam

I am having trouble with my MS.Bot.Framework + Luis + Azure

 await Conversation.SendAsync(activity, () => { return Chain.From(() => 
 new LUISDialog() as IDialog<object>); });

I have active Azure subscription, set up endpoint with subscription keys.

When running the MS Bot emulator I get error message "Sorry, my bot code is having trouble." Using breakpoint in debug mode, I have worked out that the "new LUISDialog" is not being triggered, it seems to skip over it.

using System;
using System.Threading.Tasks;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Luis;
using Microsoft.Bot.Builder.Luis.Models;
using System.Threading;
using George;
using Microsoft.Bot.Connector;

namespace Geoge.Dialog
{
    [LuisModel("*****", "*****")]
    [Serializable]
    public class LUISDialog : LuisDialog<object>
    {

        [LuisIntent("Greeting")]
        public async Task GreetingIntent(IDialogContext context, 
            IAwaitable<IMessageActivity> activity, LuisResult result)
        {
            string message = $"Hello there";
            await context.PostAsync(message);
            context.Wait(this.MessageReceived);
        }

Can anyone help me with this? I have spend way to much time trying to debug and think I must be missing something simple.

Nicolas R

What is strange is your initial code line:

await Conversation.SendAsync(activity, () => { return Chain.From(() => new LUISDialog() as IDialog<object>); });

If you want to use your LuisDialog, you should not have this Chain here but rather something like the following:

await Conversation.SendAsync(activity, () => new LUISDialog());

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Bot framework: “Sorry, my bot code is having an issue”. Fixed bug but how to restart conversation?

From Dev

How do I debug an x-terminal-emulator that fails to start?

From Dev

How do I debug an x-terminal-emulator that fails to start?

From Dev

How do I give a delayed response in Microsoft Bot Framework

From Dev

How do I solve a content type error in the Microsoft Bot Framework?

From Dev

How do I solve a content type error in the Microsoft Bot Framework?

From Dev

How do I send a value from a Microsoft Bot to Javascript?

From Java

How do I "shake" an Android device within the Android emulator to bring up the dev menu to debug my React Native app

From Dev

Android Studio: How do I debug an Android application that's displaying the error "Unfortunetly, App has stopped working" in emulator?

From Dev

How do I debug macros?

From Dev

How do I debug snaps?

From Dev

How do I debug DHCP?

From Java

How do I rotate the Android emulator display?

From Dev

How do I communicate with Android emulator

From Dev

File attachment works in Microsoft Bot Emulator but not in Skype

From Dev

File attachment works in Microsoft Bot Emulator but not in Skype

From Dev

How do i display images in Microsoft bot framework with only the base64 encoded string of the image?

From Dev

How do I feed the Microsoft Who Bot Information for the "Who knows about ..." query?

From Dev

How to debug Android emulator with ionic?

From Java

How do I debug authentication in Firebase?

From Dev

What is an OutOfMemoryError and how do I debug and fix it

From Java

How do I debug efficiently with spyder in Python?

From Dev

How do I debug my mongodb indexes?

From Dev

How do I use this debug macro?

From Dev

How do I debug a large git commit?

From Dev

How do I debug the output of a method in a model?

From Dev

How do I debug UIAutomator scripts with Eclipse

From Dev

How do I debug jquery AJAX calls?

From Dev

Borland Delphi: How do I debug this program?

Related Related

  1. 1

    Bot framework: “Sorry, my bot code is having an issue”. Fixed bug but how to restart conversation?

  2. 2

    How do I debug an x-terminal-emulator that fails to start?

  3. 3

    How do I debug an x-terminal-emulator that fails to start?

  4. 4

    How do I give a delayed response in Microsoft Bot Framework

  5. 5

    How do I solve a content type error in the Microsoft Bot Framework?

  6. 6

    How do I solve a content type error in the Microsoft Bot Framework?

  7. 7

    How do I send a value from a Microsoft Bot to Javascript?

  8. 8

    How do I "shake" an Android device within the Android emulator to bring up the dev menu to debug my React Native app

  9. 9

    Android Studio: How do I debug an Android application that's displaying the error "Unfortunetly, App has stopped working" in emulator?

  10. 10

    How do I debug macros?

  11. 11

    How do I debug snaps?

  12. 12

    How do I debug DHCP?

  13. 13

    How do I rotate the Android emulator display?

  14. 14

    How do I communicate with Android emulator

  15. 15

    File attachment works in Microsoft Bot Emulator but not in Skype

  16. 16

    File attachment works in Microsoft Bot Emulator but not in Skype

  17. 17

    How do i display images in Microsoft bot framework with only the base64 encoded string of the image?

  18. 18

    How do I feed the Microsoft Who Bot Information for the "Who knows about ..." query?

  19. 19

    How to debug Android emulator with ionic?

  20. 20

    How do I debug authentication in Firebase?

  21. 21

    What is an OutOfMemoryError and how do I debug and fix it

  22. 22

    How do I debug efficiently with spyder in Python?

  23. 23

    How do I debug my mongodb indexes?

  24. 24

    How do I use this debug macro?

  25. 25

    How do I debug a large git commit?

  26. 26

    How do I debug the output of a method in a model?

  27. 27

    How do I debug UIAutomator scripts with Eclipse

  28. 28

    How do I debug jquery AJAX calls?

  29. 29

    Borland Delphi: How do I debug this program?

HotTag

Archive