question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PVA: Valid adaptive card json prevents publishing to PVA

See original GitHub issue

Repro

  • Create a non-PVA bot with adaptive card, test that it works.
  • Create a PVA bot, switch to advanced authoring with composer
  • Reproduce the adaptive card in PVA bot
  • Publish

Error

"severity": "Error",
"source": "MoodCheckerDialog.en-us.lg",
"message": "Error occurred when parsing expression 'json({\r\n \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\r\n \"version\": \"1.2\",\r\n \"type\": \"AdaptiveCard\",\r\n \"body\": [\r\n {\r\n \"type\": \"Container\",\r\n \"items\": [\r\n {\r\n \"type\": \"ColumnSet\",\r\n \"columns\": [\r\n {\r\n \"type\": \"Column\",\r\n \"width\": \"auto\",\r\n \"items\": [\r\n {\r\n \"type\": \"Image\",\r\n \"url\": \"https://metatour.azurewebsites.net/img/happy.png\",\r\n \"size\": \"small\"\r\n '. missing '}' at '<EOF>'"
}
---

Sample JSON

# SendActivity_kUwtny()
[Activity
    Attachments = ${SendActivity_kUwtny_attachment_fpA8bl()}
]

# SendActivity_kUwtny_attachment_fpA8bl()
> To learn more Adaptive Cards format, read the documentation at
> https://docs.microsoft.com/en-us/adaptive-cards/getting-started/bots
- \```${json({
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.2",
  "type": "AdaptiveCard",
  "body": [
    {
        "type": "Container",
        "items": [
          {
            "type": "ColumnSet",
            "columns": [
              {
                "type": "Column",
                "width": "auto",
                "items": [
                  {
                    "type": "Image",
                    "url": "https://metatour.azurewebsites.net/img/sad.png",
                    "size": "small"
                  }
                ]
              },
              {
                "type": "Column",
                "width": "stretch",
                "items": [
                  {
                    "type": "TextBlock",
                    "text": "I'm sorry to hear that. Feel better soon.",
                    "weight": "bolder",
                    "wrap": true,
                    "BlockElementHeight" : "stretch"
                  }
                ]
              }
            ]
          }
        ]
    }
  ]
})}\```
(backslash inserted for rendering in issue comment)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
sgellockcommented, May 13, 2021

Shiproom - core P0 scenario - approved

1reaction
sgellockcommented, May 4, 2021

Shiproom - approved. please merge today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Adaptive card shown as json in PVA instead of the
When i test the dialog in PVA, it is not displaying the adaptive card. Instead its showing it in the JSON format. Can...
Read more >
Build a Trivia with me Using PVA Bot, Adaptive Cards and ...
Learn how to build PVA Bot the fun way. In this session, I will show you how to build Power Virtual Agent Bot,...
Read more >
Table - Schema Explorer | Adaptive Cards
Specifies whether grid lines should be displayed. Type: boolean; Required: No, default: true. JSON Copy.
Read more >
Power virtual agent Adaptive card using composer
The below PVA is a simple conversation created to capture the user information ... Add the Adaptive Card by adding the following JSON...
Read more >
Displaying rich responses in Power Virtual Agent Chat bot ...
To design responses using Adaptive Cards, we need to use the Bot Framework Composer. This downloads an app that needs to be installed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found