Azure Bot框架仿真器+ NGrok-错误:无法产生NGrok

发布于 2025-01-31 05:07:43 字数 3711 浏览 4 评论 0 原文

我似乎无法使Azure Bot框架模拟器与Ngork一起使用。

环境:

  • ubuntu 22.04
  • Python3

步骤我遵循:

  • 使用bot框架SDK创建一个bot
    • =>机器人与模拟器本地正常工作
  • ​教程publish-a-bot?view = azure-bot-service-4.0& amp; tabs = python“ rel =” nofollow noreferrer'>教程:发布基本的bot
    • => bot在Azure中使用测试网络聊天
    • 正常工作
  • 安装和配置
{
  "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",
    },
}

“在此处输入映像”


编辑1:whock @sairamtadadepalli-mt,

如果我更改ngrok的端口( web_addr )在配置中,我得到了一个新错误:

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

编辑2:关注 @sairamtadepalli-mt的建议,

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

​“在此处输入图像描述”>

模拟器中的错误“ ngrok状态查看器”: 看起来Ngrok隧道不再存在。尝试重新连接到nGrok或检查日志以详细说明错误。

“在此处输入图像描述”

控制台中的错误:

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


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.HTTPv2Tunnel\n 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.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


如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

琉璃梦幻 2025-02-07 05:07:43

我在W10 PC中使用Ngrok V3遇到了类似于您的问题。
我尝试了几件事,例如使用YAML文件配置隧道,没有运气。

最后,我从此链接中使用了NGROK版本2.3.40: ngrok

'现在一切正常。 Hth

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

破晓 2025-02-07 05:07:43

现在,请只使用NGrok版本2,而不是3版用于bot仿真器。如@cdiazal所述,我通过安装2.3.40版本来工作。

模拟器尚无更新与Ngrok 3兼容

。在此处读取问题线程: https:> https:> https: //github.com/microsoft/botframework-emulator/issues/2389

For now, please just use ngrok version 2 and not 3 for bot emulator. I had mine working by installing version 2.3.40 as mentioned by @cdiazal.

No update yet for emulator to be compatible with ngrok 3.

Read the issue thread here: https://github.com/microsoft/BotFramework-Emulator/issues/2389

巨坚强 2025-02-07 05:07:43

该问题被复制,解决问题所需的更改是两个。

解决方案1:

发现:问题屏幕截图中的主要发现是 tunneling ngrok的软件未正确安装。在安装中,从您的末端完成了,但是配置需要从端口方面更改。

解决方案:再次从头开始安装隧道软件

解决方案2:

发现:当仿真器未能加载并启动所需操作时,这意味着,试图连接的帖子已经在使用。当它试图连接到新端口时,问题将发生

以下链接,以在Linux Machine上安装和配置Ngrok

https ://ngrok.com/download

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文