简体   繁体   English

机器人遇到错误或错误。 要继续运行此机器人,请修复机器人源代码

[英]The bot encountered an error or bug. To continue to run this bot, please fix the bot source code

I am a newbie in Azure BOT development.我是 Azure BOT 开发的新手。 I am trying to run a sample source code in the following GitHub repo ( Developed in .net core 3.1 C# ).我正在尝试在以下 GitHub 存储库中运行示例源代码(在 .net core 3.1 C# 中开发)。 https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-proactive-installation/csharp https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/graph-proactive-installation/csharp

I had configured the MicrosoftAppId , MicrosoftAppPassword , TeamsappcatalogAppId values in the appsettings.json file.我在appsettings.json文件中配置了MicrosoftAppIdMicrosoftAppPasswordTeamsappcatalogAppId值。 ngrok was already configured successfully. ngrok已经配置成功。 When I try to connect the BOT with the emulator the source throws an exception like the below image.当我尝试将 BOT 与模拟器连接时,源会引发如下图所示的异常。

exception.Message = "Value cannot be null. (Parameter 'key')" exception.Message = "值不能为空。(参数'key')"

在此处输入图片说明

Then it will throw the error message然后它会抛出错误信息

在此处输入图片说明

I have no idea what I am missing in the configuration.我不知道我在配置中缺少什么。

This is custom Bot sample created for Teams, I don't think it will work on all the channels eg, Emulator/WebChat etc.这是为 Teams 创建的自定义 Bot 示例,我认为它不适用于所有渠道,例如 Emulator/WebChat 等。

I think you should try running it on Teams itself.我认为您应该尝试在 Teams 上运行它。 Also make sure that you have configured the Teams Channel on Azure Bot Service.还要确保已在 Azure 机器人服务上配置团队频道

You can refer this link for available Bot SDK samples.您可以参考此链接以获取可用的 Bot SDK 示例。

I am getting this error in a emulator as well as in Microsoft Teams.我在模拟器和 Microsoft Teams 中收到此错误。 Can you say what brings this error into a picture?你能说出是什么让这个错误变成了图片吗?

Screenshot from MS Teams MS Teams 的屏幕截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM