microsoft / BotFramework-Emulator

A desktop application that allows users to locally test and debug chat bots built with the Bot Framework SDK.
https://aka.ms/botemulator
MIT License
1.79k stars 748 forks source link

Can't load my adaptive card #2409

Closed piyush97 closed 1 year ago

piyush97 commented 1 year ago

Version of emulator

4.14.1

Describe the bug

To Reproduce

Steps to reproduce the behavior:

  1. Use the json attached
{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.4",
    "speak": "Weather forecast for Monday is high of 62 and low of 42 degrees with a 20% chance of rainWinds will be 5 mph from the northeast",
    "body": [
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": 35,
                    "items": [
                        {
                            "type": "Image",
                            "url": "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8cmFuZG9tJTIwcGVvcGxlfGVufDB8fDB8fA%3D%3D&auto=format&fit=crop&w=100&q=60",
                            "size": "Stretch"
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": 65,
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Piyush Mehta",
                            "weight": "Bolder",
                            "size": "Large",
                            "color": "Dark"
                        },
                        {
                            "type": "TextBlock",
                            "text": "16 January 2023",
                            "size": "Medium",
                            "spacing": "None"
                        }
                    ]
                }
            ]
        },
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Project",
                            "wrap": true
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Time",
                            "wrap": true
                        }
                    ]
                }
            ]
        }
    ]
}
  1. It fails to load, although I'm using the stable version 1.4 image

  2. I used adaptive card designer to make and design the card

Expected behavior

Should show adaptive card in emulator or should show an error on adaptivecard.io designer.

Adaptive Card shows like this image

[bug]

stevkan commented 1 year ago

@piyush97 - Trying to repro the issue. I'll keep you posted on what I find.

stevkan commented 1 year ago

@piyush97, thank you for your patience. Emulator utilizes BotFramework-WebChat in its code base for the construction of the transcript window, send box, and certain other features. While Web Chat has been updated to support up to version 1.5 of Adaptive Cards, Emulator has yet to be updated to the current version of Web Chat. Unfortunately, Emulator only supports up to version 1.3.

As an alternative, you could use the 04.api/f.selectable-activity Web Chat sample which allows inspecting each message activity as they pass thru, and it is up-to-date.

In the meantime, I'll create an issue to track this bug. Please be aware that there is no ETA at this time on when an update will be available.

piyush97 commented 1 year ago

Thank you so much for the prompt reply, I've moved my cards to version 1.3, unfortunately, 1.3 doesn't support tables. I'm excited to try the updated version as soon as it gets released.

stevkan commented 1 year ago

Tracking issue in #2407