Botframework-webchat: AdaptiveCard issue with webchat.js DirectLine

Created on 8 Aug 2019  路  1Comment  路  Source: microsoft/BotFramework-WebChat

When i am trying to show below adaptive card in directline whole page goes blank and i see below error console log of browser, However it works fine with emulator as well as Iframe or botchat :

Adaptive Card Json :

{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "Container",
      "items": [
        {
          "type": "TextBlock",
          "colour": "#00F",
          "size": "medium",
          "weight": "Bolder",
          "text": "Incident Details"
        },
        {
          "type": "ColumnSet",
          "columns": [
            {
              "type": "Container",
              "items": [

                {
                  "type": "FactSet",
                  "facts": [
                    {
                      "title": "Sequence",
                      "value": "@usersequence",
                      "isSubtle": true,
                      "wrap": true
                    },
                    {
                      "title": "**IncidentNumber**",
                      "weight": "Bolder",
                      "BlockElementHeight": "Large",
                      "value": "**@userIncidentNo**",
                      "colour": "attention"
                    },
                    {
                      "title": "Status",
                      "weight": "Bolder",
                      "value": "@userIncidentState",
                      "wrap": true
                    },
                    {
                      "title": "ShortDescription",
                      "value": "@userShortDesc"
                    }
                  ],
                  "width": "stretch"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
}

Screenshots

Error we see in browser console :
error

[Bug]

(Edited by @compulim for code formatting)

Bot Services Bug customer-replied-to customer-reported

Most helpful comment

Looks like your Adaptive Card JSON doesn't follow the schema correctly. If you copy-and-paste the JSON into Adaptive Cards Visualizer or Designer, you will hit the same issue.

You should change:

          "columns": [
            {
              "type": "Container",
              "items": [

                {

to

          "columns": [
            {
              "type": "Column",
              "items": [

                {

>All comments

Looks like your Adaptive Card JSON doesn't follow the schema correctly. If you copy-and-paste the JSON into Adaptive Cards Visualizer or Designer, you will hit the same issue.

You should change:

          "columns": [
            {
              "type": "Container",
              "items": [

                {

to

          "columns": [
            {
              "type": "Column",
              "items": [

                {
Was this page helpful?
0 / 5 - 0 ratings

Related issues

corinagum picture corinagum  路  3Comments

stevengum picture stevengum  路  4Comments

compulim picture compulim  路  3Comments

compulim picture compulim  路  3Comments

felixhauserch picture felixhauserch  路  3Comments