Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PVA: Valid adaptive card json prevents publishing to PVA #7394

Closed
scheyal opened this issue Apr 27, 2021 · 11 comments · Fixed by #7564, #7593 or #7808
Closed

PVA: Valid adaptive card json prevents publishing to PVA #7394

scheyal opened this issue Apr 27, 2021 · 11 comments · Fixed by #7564, #7593 or #7808
Assignees
Labels
Area: PVA Build Bugbash P0 Must Fix. Release-blocker ShipRoom-Approved Ship room has approved this issue for the release Type: Bug Something isn't working
Milestone

Comments

@scheyal
Copy link
Contributor

scheyal commented Apr 27, 2021

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)
@scheyal scheyal added Type: Bug Something isn't working Needs-triage A new issue that require triage labels Apr 27, 2021
@scheyal
Copy link
Contributor Author

scheyal commented Apr 27, 2021

And another sample json

# SendActivity_3su1l3()
[Activity
    Attachments = ${SendActivity_3su1l3_attachment_jGnBkM()}
]

# SendActivity_3su1l3_attachment_jGnBkM()
> 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": "Image",
        "url": "https://metatour.azurewebsites.net/img/happysad.png",
        "size": "large",
        "horizontalAlignment" : "center"
      },
      {
        "type": "TextBlock",
        "text": "**Mood Checker**",
        "weight": "bolder",
        "size": "large",
        "isSubtle": false,
        "horizontalAlignment" : "center"
      },
      {
        "type": "TextBlock",
        "text": "Demonstrate simple intent detection",
        "isSubtle": true,
        "horizontalAlignment" : "center"
      }
    ]
  }
  ]
})}\```
(backslash inserted for rendering in issue comment)

@Dewain27 Dewain27 added Area: Publish P1 Painful if we don't fix, won't block releasing and removed Needs-triage A new issue that require triage labels Apr 27, 2021
@scheyal scheyal added the P0 Must Fix. Release-blocker label Apr 27, 2021
@Dewain27 Dewain27 removed the P0 Must Fix. Release-blocker label Apr 27, 2021
@iMicknl
Copy link
Member

iMicknl commented Apr 28, 2021

I faced this issue (again) today and logged #7450.

Our workaround for now is to move the json() function call to the Activity block, however this is a manual action and should not be required. It seems that the PVA back-end has an error in the validation..

[Activity
    Attachments = $json({SendActivity_eBobKx_attachment_VNSg6J())}
]

@Dewain27 Dewain27 added P0 Must Fix. Release-blocker and removed P1 Painful if we don't fix, won't block releasing Area: Publish labels Apr 30, 2021
@Dewain27 Dewain27 assigned cwhitten and unassigned GeoffCoxMSFT Apr 30, 2021
@Dewain27
Copy link
Contributor

@cwhitten please see if this is something @tdurnford should look at. We are getting multiple reports of this.

@Dewain27 Dewain27 added this to the R13 milestone Apr 30, 2021
@Dewain27 Dewain27 added Area: PVA Needs-triage A new issue that require triage labels Apr 30, 2021
@cwhitten
Copy link
Member

@Dewain27, this is a bug in the SDK that was fixed as of 4.12.2 and PVA's runtime is on 4.11

@cwhitten
Copy link
Member

For ship-room discussion:

The Adaptive Card template that is provided with the updated LG authoring widget is not PVA compatible due to this issue. R13 consideration is to update the template to be SDK 4.11 compatible.

@sgellock
Copy link
Member

sgellock commented May 3, 2021

Shiproom - lets spike the adaptive card template and see where we land

@sgellock sgellock added ShipRoom-Approved Ship room has approved this issue for the release and removed Needs-triage A new issue that require triage labels May 4, 2021
@sgellock
Copy link
Member

sgellock commented May 4, 2021

Shiproom - approved. please merge today.

@scheyal scheyal reopened this May 13, 2021
@scheyal scheyal added Build Bugbash and removed ShipRoom-Approved Ship room has approved this issue for the release labels May 13, 2021
@scheyal
Copy link
Contributor Author

scheyal commented May 13, 2021

My bot is still not able to publish the json.

@cwhitten
Copy link
Member

@scheyal you would need to recreate the response template, which would come with a new format that PVA supports, not reuse the existing one that did not work. Can you please confirm that

@cwhitten
Copy link
Member

I've been able to reproduce this, and the explanation from PVA is that they need to take a bump to a BF lib in order to support the syntax in the updated template that came in with #7593

We'll need to deploy a workaround though, as their release timeline for this change is mid June

@sgellock sgellock added the ShipRoom-Approved Ship room has approved this issue for the release label May 13, 2021
@sgellock
Copy link
Member

Shiproom - core P0 scenario - approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment