Emulator doesn't recognize localhost
See original GitHub issueGithub issues should be used for bugs and feature requests. Use Stack Overflow for general “how-to” questions.
Version
4.4.2
Describe the bug
My bot is run though http://localhost:3978/api/messages, which I can confirm through trying to connect to the port in browser. However, the emulator is not recognizing the port. Regardless of whether or not the bot is running, I get the same error log:
[08:52:02]Emulator listening on http://localhost:61074
[08:52:02]ngrok not configured (only needed when connecting to remotely hosted bots)
[08:52:02]Connecting to bots hosted remotely
[08:52:02]Edit ngrok settings
[08:52:02]The bot's Microsoft App Id or Microsoft App Password is incorrect.
[08:52:02]POSTdirectline.conversationUpdate
[08:52:02]The bot's Microsoft App Id or Microsoft App Password is incorrect.
[08:52:02]POSTdirectline.conversationUpdate
[08:52:02]POST200directline.startConversation
[08:53:17]-> messagehello
[08:53:17]POST400directline.postActivity
To Reproduce
Steps to reproduce the behavior:
- Get EchoBot sample code (from either Azure or Framework Template)
- Start debugging
- Obtain localhost address shown by browser page
- In bot emulator, press “Open Bot” and enter localhost address, as well as AppId and password obtained from appsettings.json file.
- Click connect
Expected behavior
The log appears as above, with any input messages giving the same POST 400 error.
Additional context
I have tried the following potential solutions with no luck:
- Download clean version of the echo bot
- Leave blank, comment out, or delete AppId and Password
- Reinstall Visual Studio
- Reinstall packages
- Build the echo bot from command line instead of Visual Studio
- Try “create a new bot configuration”, which just gives an infinite “connecting” message
- Try previous versions of the emulator
I have also documented the problem on Stack Overflow: https://stackoverflow.com/questions/56529611/bot-emulator-error-post-400-directline-postactivity
[bug]
Issue Analytics
- State:
- Created 4 years ago
- Comments:22 (11 by maintainers)
Top GitHub Comments
Hi @khiemnvd ,
Try setting the
HTTPS_PROXY
environment variable with the address of your proxy, and then try using the Emulator to connect to your bot. (I would recommend restarting the Emulator after setting the variable)Ex:
set HTTPS_PROXY=http://[proxy-address][:port]
Closing due to inactivity.