英文:
Teams Toolkit: Bot not receiving messages from Teams
问题
我已经按照基本说明在 .NET 中使用 Teams Toolkit 创建了一个新的命令机器人。然而,在通过 MS Teams 发送消息与之交互时,我没有收到任何发送到我的 /api/messages 端点或 ngrok 端点的请求。
- 下载并安装 ngrok(https://ngrok.com/)。
- 打开命令提示符并运行
ngrok http 5130
。 - 右键单击项目,选择 Teams Toolkit > 准备 Teams 应用程序依赖项。
- 如有提示,请使用要安装应用程序的 Teams 组织的 Microsoft 365 帐户登录。
- 按 F5,或选择 Visual Studio 中的调试 > 开始调试菜单。
- 在启动的浏览器中,选择“添加”按钮以在 Teams 中加载应用程序。
- 在聊天栏中键入并发送“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.
- Download and install ngrok (https://ngrok.com/)
- Open a command prompt and run
ngrok http 5130
- Right-click your project and select Teams Toolkit > Prepare Teams App Dependencies
- If prompted, sign in with a Microsoft 365 account for the Teams organization you want
to install the app to - Press F5, or select the Debug > Start Debugging menu in Visual Studio
- In the launched browser, select the Add button to load the app in Teams
- 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应用并继续调试。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论