0

我正在为contentBotId指定的 MS 团队构建一个静态选项卡。staticTabs清单条目如下所示:

"staticTabs": [
    {
        "entityId": "availability",
        "name": "Availability",
        "scopes": [ "personal" ],
        "contentBotId": "myBotId",
        "context": [ "personalTab" ]
    },
    {
        "entityId": "coffees",
        "name": "Coffees",
        "scopes": [ "personal" ],
        "contentUrl": "https://my-content-url.com/...",
        "websiteUrl": "https://my-website-url.com/...",
        "context": ["personalTab"]
    }
],

因此,Availability 选项卡使用 contentBotId,Coffees 选项卡是一个网站。我对 Coffees 选项卡没有任何问题,但在聊天范围内的可用性选项卡有问题。
当我尝试从个人应用程序侧面板打开“可用性”选项卡时 - 一切都按预期工作:但是当我尝试从与我的机器人聊天中打开相同的选项卡时 - MS Teams 显示到达此应用程序错误时出现问题: 在 MS Team Dev 控制台我可以看到以下错误:在此处输入图像描述
在此处输入图像描述

CDL: {"errorCode":"Error","requestId":"q-15","hostRendererId":"5e3ce6c0-2b1f-4285-8d4b-75ee78787346","component":"RequestHandler","requestWindowId":"main","operationType":"query","operationName":"appDefinition","message":"error while processing q-15: {\"name\":\"Error\",\"message\":\"Variable \\\"$appId\\\" got invalid value undefined; Expected non-nullable type \\\"ID!\\\" not to be null.\",\"stack\":[]} (reason: undefined)"}
console.error @ ?agent=electron&version=21071502213:1
invoke @ main-2d2eb2cbb891032b.js:22
error @ main-2d2eb2cbb891032b.js:22
(anonymous) @ main-2d2eb2cbb891032b.js:22
safeWrapILoggerCall @ main-2d2eb2cbb891032b.js:22
error @ main-2d2eb2cbb891032b.js:22
onError @ main-2d2eb2cbb891032b.js:22
setResponseAndEndScenario @ main-2d2eb2cbb891032b.js:22
reconcileResponse @ main-2d2eb2cbb891032b.js:22
onMessageReceived @ main-2d2eb2cbb891032b.js:22
(anonymous) @ main-2d2eb2cbb891032b.js:22
(anonymous) @ main-2d2eb2cbb891032b.js:22
(anonymous) @ main-2d2eb2cbb891032b.js:27
(anonymous) @ main-2d2eb2cbb891032b.js:27
(anonymous) @ VM5:2
emit @ electron/js2c/sandbox_bundle.js:170
onMessage @ electron/js2c/sandbox_bundle.js:151

TrackRequestLink: 'appDefinition' operation of type 'query' failed.
console.error @ ?agent=electron&version=21071502213:1
invoke @ main-2d2eb2cbb891032b.js:22
error @ main-2d2eb2cbb891032b.js:22
(anonymous) @ main-2d2eb2cbb891032b.js:22
Ds @ main-2d2eb2cbb891032b.js:22
Ms @ main-2d2eb2cbb891032b.js:22
error @ main-2d2eb2cbb891032b.js:22
m @ 73296-3f79f77061841a23.js:1
b @ 73296-3f79f77061841a23.js:1
value @ 73296-3f79f77061841a23.js:1
error @ 73296-3f79f77061841a23.js:1
m @ 73296-3f79f77061841a23.js:1
b @ 73296-3f79f77061841a23.js:1
value @ 73296-3f79f77061841a23.js:1
(anonymous) @ main-2d2eb2cbb891032b.js:22
onError @ main-2d2eb2cbb891032b.js:22
onError @ main-2d2eb2cbb891032b.js:22
setResponseAndEndScenario @ main-2d2eb2cbb891032b.js:22
reconcileResponse @ main-2d2eb2cbb891032b.js:22
onMessageReceived @ main-2d2eb2cbb891032b.js:22
(anonymous) @ main-2d2eb2cbb891032b.js:22
(anonymous) @ main-2d2eb2cbb891032b.js:22
(anonymous) @ main-2d2eb2cbb891032b.js:27
(anonymous) @ main-2d2eb2cbb891032b.js:27
(anonymous) @ VM5:2
emit @ electron/js2c/sandbox_bundle.js:170
onMessage @ electron/js2c/sandbox_bundle.js:151

TrackRequestLink: Errors ['{"name":"Error","message":"Variable \"$appId\" got invalid value undefined; Expected non-nullable type \"ID!\" not to be null.","stack":[]}']

Error: Unable to fetch app definition

我已经仔细检查了清单模式,并认为我没有遗漏任何东西,但可能是错误的。如果是,请纠正我。我使用的架构是:https ://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json和清单版本是 1.9
如果您需要更多详细信息,请告诉我我和谢谢你的帮助!

4

2 回答 2

1

我从未尝试过使用 contentBotId,因为我的标签页后面总是有 Web 内容,但作为备份,您可以考虑创建一个网页/SPA,它使用 javascript 库简单地托管和呈现您的自适应卡。这是一个示例:https ://docs.microsoft.com/en-us/adaptive-cards/sdk/rendering-cards/javascript/render-a-card

于 2021-09-14T17:02:44.143 回答
0

在评论部分添加我的答案,以获得更多可见性:

此错误修复正在进行中。我们没有确切的预计到达时间可以分享,但很快就会公开。

于 2021-09-28T18:06:07.697 回答