I can't seem to make Azure Bot Framework Emulator work with Ngork.
Environment :
- Ubuntu 22.04
- Python3
Steps I followed :
- Create a bot with the Bot Framework SDK
- => bot works fine locally with the Emulator
- Tutorial: Provision a bot in Azure
- Tutorial: Publish a basic bot
- => bot works fine in Azure with the Test Web Chat
- install and configure Tunneling (ngrok)
- => the status page of Ngrok (http://localhost:4040/status) says it is Onine
- => "Ngrok Status Viewer" says "Tunnel Status" is on error in the Emulator
- => I have error messages in the Emulator :
Failed to spawn ngrok. Please go to the Ngrok Status Viewer and download the log file for a more detailed view of the error.
- => the status page of Ngrok (http://localhost:4040/status) says it is Onine
{
"error_code": 102,
"status_code": 400,
"msg": "invalid tunnel configuration",
"details":
{
"err": "yaml: unmarshal errors:\n line 1: field region not found in type config.HTTPv2Tunnel\n line 1: field path not found in type config.HTTPv2Tunnel",
},
}
Edit 1 : following @sairamtadepalli-mt 's suggestion
If I change Ngrok's port (web_addr
) in the config, I get a new error :
Connecting to bot on https://XXX.azurewebsites.net/api/messages
ngrok reconnected.
ngrok listening on http://localhost:36599
ngrok traffic inspector:
Will bypass ngrok for local addresses
Failed to spawn ngrok. Please go to the Ngrok Status Viewer and download the log file for a more detailed view of the 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
Configure ngrok
Edit 2 : following @sairamtadepalli-mt 's suggestion
Here is what I see in the Status Viewer and console (still the same error as initially...) :
Error in the Emulator "Ngrok Status Viewer" :
Looks like the ngrok tunnel does not exist anymore. Try reconnecting to Ngrok or examine the logs for a detailed explanation of the error.
Error in the console :
Failed to spawn ngrok Error: {"error_code":102,"status_code":400,"msg":"invalid tunnel configuration","details":{"err":"yaml: unmarshal errors:\n line 1: field region not found in type config.HTTPv2Tunnel\n line 1: field path not found in type config.HTTPv2Tunnel"}}
at NgrokInstance.runTunnel (/tmp/.mount_BotFraqqaRh3/resources/app.asar/app/server/ngrok.js:257:17)
at async NgrokInstance.connect (/tmp/.mount_BotFraqqaRh3/resources/app.asar/app/server/ngrok.js:120:24)
at async /tmp/.mount_BotFraqqaRh3/resources/app.asar/app/server/ngrokService.js:165:15