Sergey Anisimov
Sergey Anisimov

Reputation: 895

MS Teams static tab with content bot id shows error in personal chat scope

I am building a static tab for MS Teams with contentBotId specified.The staticTabs manifest entry looks as following:

"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"]
    }
],

So, the Availability tab is using contentBotId and Coffees tab is a website. I have no problems with Coffees tab at all but have problems with Availability tab in chat scope.
when I am trying to open the Availability tab from personal apps side panel - all works as expected:enter image description here
But when I am trying to open the same tab from chat with my bot - MS Teams shows There was a problem reaching this app error: enter image description here In MS Team Dev console I can see the following errors:

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

I've double checked manifest schema and think I am not missing anything but might be wrong. Please correct me if so. The schema I am using is: https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json and manifest version is 1.9
Let me know if you need more details from me and thank you for help!

Upvotes: 0

Views: 743

Answers (2)

ChetanSharma-msft
ChetanSharma-msft

Reputation: 863

This bug fix is on the way. We do not have exact ETA to share but it will be available publicly soon.

Upvotes: 0

Hilton Giesenow
Hilton Giesenow

Reputation: 10854

I've not ever tried using contentBotId as I've always had web content behind my tab, but as a backup you can consider creating a web page / SPA that simply hosts and renders your adaptive card using the javascript library. Here's an example: https://learn.microsoft.com/en-us/adaptive-cards/sdk/rendering-cards/javascript/render-a-card

Upvotes: 1

Related Questions