简体   繁体   中英

Bot framework emulator not working

I started learning bot framework last week, and i decided to start off with the default bot project that returns your input and its number of character. But unfortunately, I couldn't test the bot application in bot emulator. It can't just send my input. It displays "couldn't send" whenever I forward an input. My endpoint url which is http://localhost:3979/api/messages/ is correctly written there. What could be wrong? I'm just a starter in bot framework and bot building.

As I'm not aware of the exact code which you are trying to execute, I'd suggest few points to be checked again.

Checkpoints:

  1. Make sure you are running the code in debug mode with any browser (Edge, chrome, explorer etc.) and then run in the emulator.
  2. Configure or link the emulator with ngrok. (Though it is not required when running locally but it may resolve if the emulator is not working with firewall issues)
  3. Please check the Microsoft App Id and Microsoft App Password are the same in emulator and Web.config file.
  4. Try with blank Microsoft App Id and Microsoft App Password in both Web.config file and emulator.
  5. Check if the endpoints on the browser and emulator are the same
  6. If you are encountering other errors like 401, 405, 500 please check this article .
  7. In case if all the check points are right and you are still encountering an issue while running the code in emulator, there might be an issue with the code or reference libraries. You can also check the working example .

Check your visual studio .bot file. It should be like this.......

    {
        "name": "EmulatorBot",
        "description": "",
        "services": [
            {
                "type": "endpoint",[enter image description here][1]
                "endpoint": "http://localhost:3978/api/messages",
                "name": "EmulatorBot20181123022900",
                "id": "25"
            }
        ],
        "padlock": "",
        "version": "2.0",
        "path": "C:\\Users\\suraj.tiwari\\Desktop\\Bot NK\\EmulatorBot\\EmulatorBot.bot",
        "overrides": null
    }

Add an Endpoint for your bot

    Endpoint url : http://localhost:3978/api/messages
    Name : EmulatorBot20181123022900

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM