Moni
Moni

Reputation: 949

How is serviceUrl of a bot (created using MS bot framework) decided

I recently moved my MS bot code (created using MS bot framework into my new laptop). However, in emulator, there is a difference in behavior in two laptops.

The bot is hosted in azure cloud as an app service.

In my old laptop, when I send a message, the serviceUrl is set to an ngrok URL (I dont know how, that what I am trying to figure out).

In my new laptop, I am not able to test the bot in new laptop and emulator keeps on complaining

[03:51:09] Error: The bot is remote, but the callback URL is localhost. Without tunneling software you will not receive replies. 
[03:51:09] Connecting to bots hosted remotely 
[03:51:09] Edit ngrok settings 
[03:51:09] Error: The bot is remote, but the callback URL is localhost. Without tunneling software you will not receive replies. 
[03:51:09] Connecting to bots hosted remotely 
[03:51:09] Edit ngrok settings 
[03:51:11] -> POST 200 [conversationUpdate] 
[03:51:11] -> POST 200 [conversationUpdate] 
[03:51:15] Error: The bot is remote, but the callback URL is localhost. Without tunneling software you will not receive replies. 
[03:51:15] Connecting to bots hosted remotely 
[03:51:15] Edit ngrok settings 
[03:51:16] -> POST Request to 'https://something.azurewebsites.net/api/messages' failed: [500] Internal Server Error 

I have edited ngrok settings to give it a path to ngrok exe.

Can any one tell me how the service url is decided? I am not sure why it works on one laptop but not on the other one.

Thanks

Upvotes: 2

Views: 1086

Answers (1)

First ensure you are running a version of ngork 2.1.18 or newer, then , Open the emulator's App Settings dialog, enter the path to ngrok, select whether or not to bypass ngrok for local addresses, and click Save.enter image description here

I'd recommend checking the following link, it has more details about the setup.

Upvotes: 1

Related Questions