Azure Bot框架仿真器+ NGrok-错误:无法产生NGrok
我似乎无法使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中使用测试网络聊天 正常工作
- 安装和配置
- => Ngrok的状态页面(http:// localhost:4040/status)表示是 onine
- => “ ngrok状态查看者”说“隧道状态”在模拟器中错误
- =>我在模拟器中有错误消息:
未能产生ngrok。请转到NGROK状态查看器,然后下载日志文件以获取错误的更详细视图。
- => Ngrok的状态页面(http:// localhost:4040/status)表示是 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",
},
}
编辑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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在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
现在,请只使用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
该问题被复制,解决问题所需的更改是两个。
解决方案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.