Teams Toolkit:机器人未能从Teams接收消息

huangapple go评论69阅读模式
英文:

Teams Toolkit: Bot not receiving messages from Teams

问题

我已经按照基本说明在 .NET 中使用 Teams Toolkit 创建了一个新的命令机器人。然而,在通过 MS Teams 发送消息与之交互时,我没有收到任何发送到我的 /api/messages 端点或 ngrok 端点的请求。

  1. 下载并安装 ngrok(https://ngrok.com/)。
  2. 打开命令提示符并运行 ngrok http 5130
  3. 右键单击项目,选择 Teams Toolkit > 准备 Teams 应用程序依赖项。
  4. 如有提示,请使用要安装应用程序的 Teams 组织的 Microsoft 365 帐户登录。
  5. 按 F5,或选择 Visual Studio 中的调试 > 开始调试菜单。
  6. 在启动的浏览器中,选择“添加”按钮以在 Teams 中加载应用程序。
  7. 在聊天栏中键入并发送“helloWorld”以触发响应。

未看到任何请求。

我尝试过从 https://dev.botframework.com 进行测试,在那里我可以登录并测试我的机器人。我从那里确实收到请求。因此,问题似乎只出现在 Teams 中。在 Teams(chrome)的开发工具网络选项卡中没有错误信息。

我如何进一步调试此问题?是否可以追踪消息到 Azure 机器人服务及以后的步骤?

英文:

I have followed the basic instructions to create a new command bot using the Teams Toolkit in .NET. However, interacting with this by sending messages through MS Teams, I am not receiving any requests to my /api/messages endpoint or my ngrok endpoint.

  1. Download and install ngrok (https://ngrok.com/)
  2. Open a command prompt and run ngrok http 5130
  3. Right-click your project and select Teams Toolkit > Prepare Teams App Dependencies
  4. If prompted, sign in with a Microsoft 365 account for the Teams organization you want
    to install the app to
  5. Press F5, or select the Debug > Start Debugging menu in Visual Studio
  6. In the launched browser, select the Add button to load the app in Teams
  7. In the chat bar, type and send "helloWorld" to your app to trigger a response

No request is seen.

I have tried testing this from https://dev.botframework.com where I can login and test my bot. I do receive requests from there. So, the issue seems isolated to Teams. No errors in the network tab of dev tools on teams (chrome).

How can I debug this further, is it possible to trace a message through to the azure bot service and onwards?

答案1

得分: 0

请尝试打开浏览器并导航到'your-ngrok-url/api/messages',查看显示的内容是什么?如果遇到显示ngrok_6022错误的页面,您可以按照该页面上的指南添加身份验证令牌并重新启动ngrok。完成这些步骤后,您可以再次准备Teams应用并继续进行调试。或者,您可以使用以下命令启动ngrok:'ngrok http 5130 --log=stdout --log-format=logfmt --authtoken (your-auth-token)',然后准备Teams应用并继续调试。

Teams Toolkit:机器人未能从Teams接收消息

英文:

Could you please try opening a browser and navigating to 'your-ngrok-url/api/messages' to see what content is displayed? If you encounter a page that shows a ngrok_6022 error like this, you can follow the guidelines on that page to add an authentication token and restart ngrok. After doing so, you can prepare the Teams app again and proceed with debugging. Alternatively, you can start ngrok using the command 'ngrok http 5130 --log=stdout --log-format=logfmt --authtoken (your-auth-token)' and then prepare the Teams app and resume debugging.

Teams Toolkit:机器人未能从Teams接收消息

huangapple
  • 本文由 发表于 2023年7月10日 23:43:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76655331.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定