Can't connect to my bot from bot emulator
When I try to connect with my emulator, I get the following error: POST connect ECONNREFUSED 127.0.0.1:3979
I tried running VS as administrator and created a 'virtual directory' in: project properties -> web tab -> create visual directory.
Visual Directory is set to: http://localhost:3979/, where '3979' is my local port get from running VS bot template. When you run the template from VS, it opens the browser with the url below: http://localhost:3979/, so I am sure that Virtual Directory is right.
Your shared ideas are highly appreciated.
Hi @mahmoudahmedarafa, A few questions:
- Was your bot running on the same machine as the emulator? (To connect over localhost the bot and emulator need to be running on the same box).
- Did you create your bot from the C# Bot Application VS template? (there's an old version of the template available that isn't compatible with the new emulator).
Thanks, Eric
@eanders-MS What do you mean by "there's an old version of the template available that isn't compatible with the new emulator"? If the emulator automatically updates itself shouldn't it be compatible with older bot builder sdk versions? Is it a matter of me upgrading to the latest 3.5.9 bot builder nuget package? Can you elaborate more what why the template is incompatible because I am getting some different behavior in the emulator update that just occurred. Either way I'll try upgrading to 3.5.9
Although we're still in preview, we go to great pains to remain backward compatible, and make every effort to message breaking changes well in advance. There have been a few occasions where we've had to make breaking changes. The one I referred to had to do with an early change to the connector protocol schema.
Users have resolved issues similar to yours by using an updated bot application template, as referenced in this issue https://github.com/Microsoft/BotFramework-Emulator/issues/165. The actual fix is likely updating their BotBuilder SDK. Did updating your nuget package resolve the issue?
By the way, we released an updated emulator today. Direct download link: https://github.com/Microsoft/BotFramework-Emulator/releases
@eanders-MS I managed to run my bot with an earlier version of the C# bot template. Thank you for help, I will try the updated emulator ASAP.
Closing this out now. If you're still having a problem drop a note here and I'll reopen.
Hi @eanders-MS , we are currently developing Bot with new functions based on BotBuilder SDK. But, we got the same issue of the new Bot emulator does not working with previous version of BotBuilder SDK. Instead of updating to the latest version, do you know how do we stop auto-updating the Bot emulator? Does it possible?
Hi @CalvinFengDatacom, are you implementing your own CredentialManager? The C# SDK contains a bug we only discovered after releasing the latest emulator. We have a fix in the works for the SDK, and also a new emulator coming out later this week with a workaround. In the meantime, follow the instructions here to disable emulator auto-update: https://github.com/Microsoft/BotFramework-Emulator/issues/322#issuecomment-340220031
We've released a new version of the emulator with a workaround for this issue. Once you have the new emulator installed, you can open the App Settings dialog and check the "use version 1.0 authentication tokens" checkbox. In the meantime, a proper fix has been made in the C# SDK and is in the release pipeline.
Good one @eanders-MS ! Thanks, its working for my BotBuild SDK version 3.8.4 now.