首页 > 解决方案 > 机器人模拟器没有产生 ngrok

问题描述

我正在尝试使用 Microsoft 的虚拟助手模板(https://github.com/microsoft/botframework-solutions/blob/master/docs/readme.md),虽然我终于成功安装并通过 Web 工作在 Azure 中聊天,我无法让它在本地的 Bot Emulator 中运行。我已经安装了 ngrok,并且 Bot Emulator 设置为在启动时启动它,它抛出了一个错误。

在 Bot Emulator 设置中,我填充了 ngrok 可执行文件的路径,我选中了 Bypass ngrok for local addresses 复选框(来自此解决方案的设置文档中的示例,我选中了 Run ngrok when the Emulator start up 复选框,本地主机覆盖设置为 localhost(同样,来自解决方案示例),并且区域设置设置为 en-US。我尝试检查和取消选中绕过 ngrok 获取本地地址复选框,但结果是相同的。

下面是 Bot Emulator 中连接尝试的输出。

[12:02:12]Emulator listening on http://localhost:50757
[12:02:33]Error: The bot is remote, but the service URL is localhost.
Without tunneling software you will not receive replies.
[12:02:33]Connecting to bots hosted remotely [12:02:33]Configure ngrok
[12:02:33]Failed to spawn
ngrok{"error_code":104,"status_code":503,"msg":"ngrok is not yet ready
to start tunnels","details":{"err":"a successful ngrok tunnel session
has not yet been established"}}

我怀疑缺少一些 ngrok 配置,但文档仅显示了与使用 ngrok 进行隧道传输相关的 Bot Emulator 设置。

标签: botframeworkngrok

解决方案


我将所有东西重新部署到一个新的虚拟机上,虽然我最初仍然遇到 ngrok 无法生成错误,但这只是一个时间问题,因为它稍后会连接并且虚拟助手在机器人模拟器中本地加载和运行。感谢大家的建议。


推荐阅读