microsoft/botbuilder-js

handleTeamsTaskModuleFetch not opening popups on iOS

jorge-d opened this issue · 2 comments

Versions

What package version of the SDK are you using. => botbuilder 4.21.1
What nodejs version are you using => node JS v18.17.1
What browser version are you using => Irrelevant, issue is specific to Microsoft Teams IOS (v5.20.2, release Branch 2023Oct-T2)
What os are you using => iOS 17.0.3

Describe the bug

We have an issue only on Microsoft Teams iOS where the "handleTeamsTaskModuleFetch" callback will be properly called but popup is never opened.

To Reproduce

  1. send yourself a basic adaptive card with the following payload:
const card = {
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.2",
  "body": [
  {
    "type": "TextBlock",
    "text": "Click on the button below to open the preview",
    "wrap": true
  }
  ],
  "actions": [
  {
    "type": "Action.Submit",
    "title": "Preview",
    "data": {
      "msteams": {
        "type": "task/fetch"
      }
    }
  }
  ]
};

const adaptiveCardAttachment = CardFactory.adaptiveCard(card);
await context.sendActivity({ attachments: [adaptiveCardAttachment] });
  1. in the handleTeamsTaskModuleFetch callback, return the following payload:
async handleTeamsTaskModuleFetch(context: TurnContext, taskModuleRequest: TaskModuleRequest) : Promise<TaskModuleResponse> {
  return {
    "task": {
      "type": "continue",
      "value": {
        "height": 200,
        "width": 400,
        "title": "Simple Card",
        "card": {
          "contentType": "application/vnd.microsoft.card.adaptive",
          "content": {
            "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
            "type": "AdaptiveCard",
            "version": "1.2",
            "body": [
            {
              "type": "TextBlock",
              "text": "This is a simple card. Click the button to proceed.",
              "wrap": true
            }
            ]
          }
        }
      }
    }
  }
}

Here is a record of the issue on iOS:

behavior_on_ios.mp4

Expected behavior

The popup should open properly once we click on the button, as in this video (Teams Desktop):

behavior_on_desktop_v2.mov

Screenshots

See videos above

Additional context

It's very akward because the exact same payload works when returned for "handleTeamsMessagingExtensionFetchTask":

async handleTeamsMessagingExtensionFetchTask(context: TurnContext, action: MessagingExtensionAction): Promise<MessagingExtensionActionResponse> {
  return {
    "task": {
      "type": "continue",
      "value": {
        "height": 200,
        "width": 200,
        "title": "Simple Card",
        "card": {
          "contentType": "application/vnd.microsoft.card.adaptive",
          "content": {
            "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
            "type": "AdaptiveCard",
            "version": "1.2",
            "body": [
              {
                "type": "TextBlock",
                "text": "This is a simple card. Click the button to proceed.",
                "wrap": true
              }
            ]
          }
        }
      }
    }
  }
}

Here is the working result:

working_extension_fetch_task.mp4

--

Could you confirm that the payloads are good (I believe adaptive cards should work on iOS up to version 1.5) and the issue in indeed due to the iOS Teams App?

FYI our teammates using Android phones do not have this problem of opening popup and work as in Desktop.

Best,