我们正在使用 msteams 机器人,使用 botframework-connector 和 botbuilder,两者均为 v4.20.1 每当用户单击自适应卡片上的某些按钮时,他们都会在卡片下方收到以下消息,尽管机器人响应良好:错误屏幕截图
他们再次看到红色框中的错误,但机器人做出了相应的响应。
检查网络选项卡后,会调用一个
/invoke
API,并因 502 错误网关而失败。
终点:https://teams.microsoft.com/api/chatsvc/in/v1/agents/28:<ourAppId>/invoke
有效负载:(我已从有效负载中编辑了敏感 ID 和详细信息)
{
"name": "messageback",
"text": "Go to 7th module",
"messageType": "RichText/Media_Card",
"value": {
"id": "66ea60cab0xxxxx",
"title": "Go to 7th module",
"type": "quickReply"
},
"imdisplayname": "Saurabh Jagtap",
"userAadToken": "eyJ0eXAREDACTED",
"serverMessageId": "17266xxxxxx",
"clientMessageId": "4774xxxx",
"conversation": {
"id": "19:[email protected]"
}
}
回复:
{
"errorCode": 1008,
"message": "<BotError>Error when sending request to bot",
"standardizedError": {
"errorCode": 1008,
"errorSubCode": 1,
"errorDescription": "<BotError>Error when sending request to bot"
}
}
我们这边最近没有任何变化。它突然开始突然冒出来。
我尝试重新安装应用程序,确保 hooks 端点返回 200 ok 响应。还要确保它不会超时。
如果机器人未在 10 到 15 秒内完成操作(具体取决于通道),Azure 机器人服务将超时并向客户端报告 504:GatewayTimeout,如机器人如何工作中所述。
为了正确处理管理长时间运行的操作,请参阅下面的文档。 https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-long-operations-guidance?view=azure-bot-service-4.0