skip to Main Content

I can’t seem to make Azure Bot Framework Emulator work with Ngork.

Environment :

  • Ubuntu 22.04
  • Python3

Steps I followed :

{
  "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.HTTPv2Tunneln line 1: field path not found in type config.HTTPv2Tunnel",
    },
}

enter image description here


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…) :

enter image description here

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.

enter image description here

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.HTTPv2Tunneln  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


2

Answers


  1. The problem was reproduced and the required changes to solve the issue are two.

    Solution 1:

    Findings: The major finding from the problem screenshot is, Tunneling software of ngrok was not installed properly. In the installation was completed from your end, but the configuration need to be changed from port side.

    Solution: Re-install the tunneling software again from the scratch

    Solution 2:

    Findings: When the Emulator failed to load and launch the required operations, it means, the Post which was trying to connect is already in use. When it is trying to connect to the new port, the issue will happen

    Follow the below link to install and configure Ngrok on Linux machine

    https://ngrok.com/download

    Configure the port which is not in use. Check whether 4040 is being used by web server or not. If it is being used, then change the port to 4041 and restart the emulator and check the connection.

    Login or Signup to reply.
  2. I had same problems like yours using Ngrok v3 in a W10 PC.
    I have tried several things like configuring tunneling with yaml files with no luck.

    Finally, I have used Ngrok version 2.3.40 from this link: ngrok releases

    And now everything is working ok. HTH

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search