我似乎不能让Azure Bot框架仿真器与Ngork一起工作。
环境:
我遵循的步骤是:

- => "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.`{
"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:以下@sairamtadepalli-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状态查看器“中的错误: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谢谢你的帮助!
发布于 2022-06-16 11:21:49
我在W10 PC上使用Ngrok v3也遇到了类似你的问题。我尝试过几种方法,比如用yaml文件配置隧道,但没有成功。
最后,我从以下链接中使用了Ngrok版本2.3.40:ngrok释放
现在一切正常。HTH
发布于 2022-05-23 08:20:35
问题再次出现,解决这一问题所需的改动有两处。
解决方案1:
结果:问题截图的主要发现是,ngrok的隧道软件没有正确安装。在安装过程中,您已经完成了安装工作,但是需要从端口端更改配置。
解决方案:从头开始重新安装隧道软件
解决方案2:
发现:当模拟器无法加载和启动所需的操作时,就意味着,试图连接的Post已经在使用。当它试图连接到新端口时,问题就会发生。
按照下面的链接在Linux机器上安装和配置Ngrok
配置未使用的端口。检查web服务器是否正在使用4040。如果正在使用它,则将端口更改为4041,重新启动模拟器并检查连接。
https://stackoverflow.com/questions/72318700
复制相似问题