Teams chat screen breaks after several interactions with Teams chatbot.

green 76 Reputation points
2023-02-20T08:54:35.45+00:00

This problem only occurs on Teams on iPhone.

After several chats with Teams chatbot, chat screen is broken.

For example, messages may not show up or previous messages may be stacked up on current messages.

It does not always happen, but it often happens after about 10 exchanges.

It seems that this problem is more likely to occur when using large Adaptive Cards.

Please try the following chatbot message and chatting several times using the OPEN button.

await step.context.sendActivity({
  attachments: [CardFactory.adaptiveCard({
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.4",
    "msteams": {
      "width": "Full"
    },
    "type": "AdaptiveCard",
    "body": [
      {
        "type": "ColumnSet",
        "columns": [
          {
            "type": "Column",
            "items": [
              {
                "type": "TextBlock",
                "text": "TextBlock",
                "size": "small",
                "color": "attention",
                "wrap": true
              }
            ]
          },
          {
            "type": "Column",
            "width": "auto",
            "items": [
              {
                "type": "TextBlock",
                "text": "\[TextBlock\]\(https://test.com\)"
                "size": "small",
                "horizontalAlignment": "right",
                "wrap": true
              }
            ]
          }
        ]
      },
      {
        "type": "TextBlock",
        "text": "TextBlock",
        "size": "extraLarge",
        "weight": "bolder",
        "wrap": true
      },
      {
        "type": "Input.ChoiceSet",
        "style": "filtered",
        "id": "ChoiceSet1",
        "label": "ChoiceSet",
        "placeholder": "ChoiceSet",
        "isRequired": true,
        "errorMessage": "ChoiceSet",
        "isMultiSelect": false,
        "choices.data": {
          "type": "Data.Query",
          "dataset": "ChoiceSet"
        },
        "choices": [],
        "value": null
      },
      {
        "type": "TextBlock",
        "text": "TextBlock"
      },
      {
        "type": "ActionSet",
        "actions": [
          {
            "type": "Action.ShowCard",
            "title": "ShowCard1",
            "id": "ShowCard1",
            "card": {
              "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
              "type": "AdaptiveCard",
              "version": "1.4",
              "body": [
                {
                  "type": "Input.ChoiceSet",
                  "id": "ChoiceSet1_1",
                  "label": "ChoiceSet1_1",
                  "choices": [
                    {
                      "title": "title1",
                      "value": "value1"
                    },
                    {
                      "title": "title2",
                      "value": "value2"
                    },
                    {
                      "title": "title3",
                      "value": "value3"
                    },
                    {
                      "title": "title4",
                      "value": "value4"
                    },
                    {
                      "title": "title5",
                      "value": "value5"
                    },
                    {
                      "title": "title6",
                      "value": "value6"
                    }
                  ],
                  "value": "value1",
                  "isVisible": false
                },
                {
                  "type": "Input.Text",
                  "id": "Text1_1",
                  "label": "Text",
                  "placeholder": "Text",
                  "value": "",
                  "isRequired": true,
                  "errorMessage": "Text"
                },
                {
                  "type": "ActionSet",
                  "actions": [
                    {
                      "type": "Action.Execute",
                      "verb": "Execute",
                      "title": "Execute",
                      "data": {
                        "Execute": "Execute"
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "Action.ShowCard",
            "title": "ShowCard2",
            "id": "ShowCard2",
            "card": {
              "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
              "type": "AdaptiveCard",
              "version": "1.4",
              "body": [
                {
                  "type": "Input.ChoiceSet",
                  "id": "ChoiceSet1_2",
                  "label": "ChoiceSet1_2",
                  "choices": [
                    {
                      "title": "title1",
                      "value": "value1"
                    },
                    {
                      "title": "title2",
                      "value": "value2"
                    },
                    {
                      "title": "title3",
                      "value": "value3"
                    },
                    {
                      "title": "title4",
                      "value": "value4"
                    },
                    {
                      "title": "title5",
                      "value": "value5"
                    },
                    {
                      "title": "title6",
                      "value": "value6"
                    }
                  ],
                  "value": "value1",
                  "isVisible": false
                },
                {
                  "type": "Input.Text",
                  "id": "Text1_2",
                  "label": "Text",
                  "placeholder": "Text",
                  "value": "",
                  "isRequired": true,
                  "errorMessage": "Text"
                },
                {
                  "type": "ActionSet",
                  "actions": [
                    {
                      "type": "Action.Execute",
                      "verb": "Execute",
                      "title": "Execute",
                      "data": {
                        "Execute": "Execute"
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "Action.ShowCard",
            "title": "ShowCard3",
            "id": "ShowCard3",
            "card": {
              "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
              "type": "AdaptiveCard",
              "version": "1.4",
              "body": [
                {
                  "type": "Input.ChoiceSet",
                  "id": "ChoiceSet1_3",
                  "label": "ChoiceSet1_3",
                  "choices": [
                    {
                      "title": "title1",
                      "value": "value1"
                    },
                    {
                      "title": "title2",
                      "value": "value2"
                    },
                    {
                      "title": "title3",
                      "value": "value3"
                    },
                    {
                      "title": "title4",
                      "value": "value4"
                    },
                    {
                      "title": "title5",
                      "value": "value5"
                    },
                    {
                      "title": "title6",
                      "value": "value6"
                    }
                  ],
                  "value": "value1",
                  "isVisible": false
                },
                {
                  "type": "Input.Text",
                  "id": "Text1_3",
                  "label": "Text",
                  "placeholder": "Text",
                  "value": "",
                  "isRequired": true,
                  "errorMessage": "Text"
                },
                {
                  "type": "ActionSet",
                  "actions": [
                    {
                      "type": "Action.Execute",
                      "verb": "Execute",
                      "title": "Execute",
                      "data": {
                        "Execute": "Execute"
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "Action.ShowCard",
            "title": "ShowCard4",
            "id": "ShowCard4",
            "card": {
              "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
              "type": "AdaptiveCard",
              "version": "1.4",
              "body": [
                {
                  "type": "Input.ChoiceSet",
                  "id": "ChoiceSet1_4",
                  "label": "ChoiceSet1_4",
                  "choices": [
                    {
                      "title": "title1",
                      "value": "value1"
                    },
                    {
                      "title": "title2",
                      "value": "value2"
                    },
                    {
                      "title": "title3",
                      "value": "value3"
                    },
                    {
                      "title": "title4",
                      "value": "value4"
                    },
                    {
                      "title": "title5",
                      "value": "value5"
                    },
                    {
                      "title": "title6",
                      "value": "value6"
                    }
                  ],
                  "value": "value1",
                  "isVisible": false
                },
                {
                  "type": "Input.Text",
                  "id": "Text1_4",
                  "label": "Text",
                  "placeholder": "Text",
                  "value": "",
                  "isRequired": true,
                  "errorMessage": "Text"
                },
                {
                  "type": "ActionSet",
                  "actions": [
                    {
                      "type": "Action.Execute",
                      "verb": "Execute",
                      "title": "Execute",
                      "data": {
                        "Execute": "Execute"
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "Action.ShowCard",
            "title": "ShowCard5",
            "id": "ShowCard5",
            "card": {
              "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
              "type": "AdaptiveCard",
              "version": "1.4",
              "body": [
                {
                  "type": "Input.ChoiceSet",
                  "id": "ChoiceSet1_5",
                  "label": "ChoiceSet1_5",
                  "choices": [
                    {
                      "title": "title1",
                      "value": "value1"
                    },
                    {
                      "title": "title2",
                      "value": "value2"
                    },
                    {
                      "title": "title3",
                      "value": "value3"
                    },
                    {
                      "title": "title4",
                      "value": "value4"
                    },
                    {
                      "title": "title5",
                      "value": "value5"
                    },
                    {
                      "title": "title6",
                      "value": "value6"
                    }
                  ],
                  "value": "value1",
                  "isVisible": false
                },
                {
                  "type": "Input.Text",
                  "id": "Text1_5",
                  "label": "Text",
                  "placeholder": "Text",
                  "value": "",
                  "isRequired": true,
                  "errorMessage": "Text"
                },
                {
                  "type": "ActionSet",
                  "actions": [
                    {
                      "type": "Action.Execute",
                      "verb": "Execute",
                      "title": "Execute",
                      "data": {
                        "Execute": "Execute"
                      }
                    }
                  ]
                }
              ]
            }
          },
        ]
      }
    ]
  })],
});

await step.prompt("CHOICE_PROMPT", {
  prompt: "",
  choices: ChoiceFactory.toChoices(["OPEN"]),
});

Issue:

20230220_073415000_iOS

I'm using:

  • Teams on iPhone: version 5.2.0, build: 5.2.77.2023023402/0205 (general)
  • iOS: 16.3
  • iPhone 12
  • Bot Framework SDK on Node.js: 4.16.0
Microsoft Teams | Development
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.