Azure Bot Framework 模拟器 + Ngrok - 错误:无法生成 ngrok

fle*_*ryc 5 azure ngrok botframework

我似乎无法让 Azure Bot Framework Emulator 与 Ngork 一起使用。

环境 :

  • 乌班图22.04
  • Python3

我遵循的步骤:

{
  "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",
    },
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述


编辑1:遵循@sairamtadepalli-mt的建议

web_addr如果我在配置中更改 Ngrok 的端口 ( ),我会收到一个新错误:

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
Run Code Online (Sandbox Code Playgroud)

编辑2:遵循@sairamtadepalli-mt的建议

这是我在状态查看器和控制台中看到的内容(仍然是与最初相同的错误......):

在此输入图像描述

模拟器“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.

在此输入图像描述

控制台错误:

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

Run Code Online (Sandbox Code Playgroud)

cdi*_*zal 11

我在 W10 PC 中使用 Ngrok v3 时遇到了与您相同的问题。我尝试过一些方法,例如使用 yaml 文件配置隧道,但没有成功。

最后,我从这个链接使用了 Ngrok 版本 2.3.40:ngrokreleases

现在一切正常。华泰


小智 0

该问题已重现,解决该问题所需的更改有两个。

解决方案一:

发现:从问题截图中发现的主要发现是, ngrok 的隧道软件没有正确安装。安装是从您端完成的,但需要从端口端更改配置。

解决方案:从头开始重新安装隧道软件

解决方案2:

结果:当模拟器无法加载和启动所需的操作时,这意味着尝试连接的 Post 已在使用中。当它尝试连接到新端口时,就会出现问题

请点击以下链接在 Linux 机器上安装和配置 Ngrok

https://ngrok.com/download

配置未使用的端口。检查4040是否被Web服务器使用。如果正在使用,则将端口更改为4041并重新启动模拟器并检查连接。