BotFramework-Emulator
BotFramework-Emulator copied to clipboard
Cannot connect the Bot Framework Emulator to a bot running on another machine inside my network without ngrok
I would like users inside my network to be able to connect the Bot Framework Emulator to a bot running on another machine inside my network. This is possible with ngrok, but it seems like ngrok should not be required since all of the machines are on the same LAN. Also, ngrok is a security concern.
It appears that older versions of the emulator had a setting for "Emulator Url" which looks like it might have been useful for this, but that setting is not present in the current version (3.5).
It is true this was a feature of early versions of the emulator. It was a source of confusion for users, and at the time its value wasn't clear, but based on your feedback and that of others, it's clear we need to bring it back.
I am trying to get Bot Emulator talking to a bot service on another machine, but within my corp network, using ngrok. Though I have Bot Emulator -> App settings on my client point to ngrok, I keep getting an error for the callback URL and I am asked to configure ngrok.
@sriharim25 In your emulator log, near the top, do you see an entry that states ngrok was started, or failed to start?
This is what I see:
[14:06:03] Error: The bot is remote, but the callback URL is localhost. Without tunneling software you will not receive replies. [14:06:03] Fix it: Configure ngrok [14:06:03] Learn more: Connecting to bots hosted remotely
I am seeing this "Failed to start ngrok: panic" in the logs, identical stack trace to this react error: https://github.com/react-boilerplate/react-boilerplate/issues/465
My emulator is running on Mac OS X and my Node.js server is on a linux tower.
What version of ngrok do you have installed? Versions older than 2.1.18 are known to be incompatible with the emulator.
I am using the latest version 2.1.18
Hi I also got the same error.
Log [10:23:15] Error: The bot is remote, but the callback URL is localhost. Without tunneling software you will not receive replies. [10:23:15] Fix it: Configure ngrok [10:23:15] Learn more: Connecting to bots hosted remotely
Please reply if you got the solution.
@sumitdobhal It looks like you're trying to connect to a bot running remotely, but not running the ngrok tunneling software. In the emulator App Settings, do you have your path to ngrok configured?
@eanders-MS I have a similar problem. I have succesfully registered a bot, running on a remote machine, in the Bot Framework. The WebChat channel works fine.
Now I want to connect to my registered endpoint using the Bot Framework Channel Emulator for debugging purposes. However, my personal computer is behind a corporate proxy and I'm using CNTML running on localhost:3128 in order to allow all my dev tools to connect to the internet.
When I launch the emulator, ngrok is started successfully and the emulator listens on a random port. When trying to connect to my bot endpoint with my AppID and Password, I get the error message
->POST tunneling socket could not be established, statusCode=403
Somehow ngrok collides with cntlm. And I can't configure ngrok in the emulator to run on a specific port or even behind our corporate proxy (e.g. by using arguments in the ngrok settings of the emulator). If I was able to provide the emulator endpoint, I could create a tunnel in cntlm. But it feels like the emulator's logic requires you to use ngrok, whenever you try to connect to a remote bot, without any regard to existing tunnels. Am I correct here?
@i-emre Thanks for adding your use case here. You are correct, this is a limitation in the current emulator. We have two changes planned that I believe will cover this issue:
- Ability to override the emulator's host and/or port.
- Ability to override the serviceUrl (where the bot sends replies)
@eanders-MS Thanks for your reply. Those two changes would be much appreciated.
@eanders-MS Any update on this one. I agree we should be able to connect to the emulator in corporate network as ngrok is blocked due to security concern.
👍 for being able to configure which port the emulator should listen on, so that when developing locally with docker you can expose it without relying on ngrok
- download https://ngrok.com/ exe.
- and configure the path of exe in emulator
Hi, I got the same error, and solved with this trick on Mac OS.
After setting the app on emulator with path/ngrok, I changed it to from path/ngrok to path/ngrok.exe. Then, I got this message:
Failed to start ngrok: spawn path/ngrok.exe ENOENT The path to ngrok may be incorrect.
I rechanged from path/ngrok.exe to path/ngrok and it worked.
Hi Team,
while deploying the bot in in Local PC by using Bot Emulator, getting the below error.
Error: The bot is remote, but the service URL is localhost. Without tunneling software you will not receive replies. Connecting to bots hosted remotely Edit ngrok settings POST 201 directline.startConversation
Looking the Resolution on this one.
Regards, Tharak
This request is going on 2 years now. Is there a plan to address this and by when?
I must I'm finding extreme difficulty in producing reliable solutions with Microsoft's bot framework. Really poor quality from a documentation, code quality, overall integration and simplicity point of view.
its 2021 , now any way to provide custom call back URL in bot emulator? so we can exclude ngrok.
Greetings. We'll take this as a backlog item to prioritize, however we cannot provide an ETA when this will be possible. We would happily accept a community contribution enabling this functionallity.
Any updates? This appears to still be broken many years later
There are a lot of security concerns on exposing Emulator like this. There is no access control on the Emulator side which means everyone in the local network would have access to the emulator instance.
That's why we limit access to Emulator APIs to the localhost only, and will likely not implement anything to bypass the limitation on our side.