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.

Sending AdaptiveCard v1.1 cause ServiceError on Facebook channel

See original GitHub issue

Version

What package version of the SDK are you using. Bot.Builder 4.3.2 Bot.Connector 4.3.2 AdaptiveCards 1.1.2

Describe the bug

When sending an adapter card using version 1.1 in the emulator - everything works great. When trying the same with facebook channel, the connector is returning 500 server exception with: “code”: “ServiceError”

To Reproduce

send message request to connector: POST https://facebook.botframework.com/v3/conversations/<con-ID>/activities/<act-ID> data:

{
	"type": "message",
	"timestamp": "2019-03-26T10:06:11.8086503+00:00",
	"serviceUrl": "https://facebook.botframework.com/",
	"channelId": "facebook",
	"from": {
		"id": "<ID>",
		"name": "say2eat-test"
	},
	"conversation": {
		"isGroup": false,
		"id": "<ID>"
	},
	"recipient": {
		"id": "<ID>",
		"name": "Bou Tiki"
	},
	"text": "sdsdsd",

"attachments": [{
		"contentType": "application/vnd.microsoft.card.adaptive",
		"content": {
			"type": "AdaptiveCard",
			"version": "1.1", //***********this will not work. 1.0 will work****************
			"body": [] //some adaptive cards body or even empty
		}
	},
],
	"replyToId": "2qtspChXQVAvKQw6RNdMIhqYZQwOpNAYm79NJscsZRvBCgowFTF8E8UgA76pZPKY5zWN7B7RyMdiXe3KlhxJYQ"
}

Expected behavior

the message will be forward to fb channel

[bug]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
v-kydelacommented, Apr 2, 2019

@CoHealer - All right, I tested GroupMe, Kik, Slack, Telegram, Twilio, and Facebook. The only other channel that returns a ServiceError is Telegram, but that channel also returns BadRequest for Adaptive Cards 1.0. The other channels all fail without error when sent an Adaptive Card 1.1.

I hadn’t realized this before, but there aren’t any 3rd-party channels that actually support Adaptive Cards. Except for Telegram, they all just render the card as an image.

@yochail - Given that Facebook doesn’t support Adaptive Cards, I’m changing my recommendation. You may find better functionality by using the Messenger platform’s native template system. This blog post can assist you: https://blog.botframework.com/2017/03/28/custom-channel-data/

0reactions
artemious7commented, Dec 4, 2019

Something similar happened to my bot. It’s connected only to Telegram channel, and it worked fine until some time ago, when it started to fail to send my Adaptive Cards. Then sending them was fine again, and now the problem reappeared. No change in bot’s code during this time. Now I found what the problem was: Adaptive Card (v1.0) contained duplicate id’s for elements, so I removed id’s completely, and now it works fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sending AdaptiveCard v1.1 cause ServiceError on ...
Update the Bot Connector to support Adaptive Cards 1.1 in the Facebook channel; Provide a more helpful error message when an activity fails ......
Read more >
Adaptive cards not rendered correctly on Facebook ...
Version 4.5.1 Describe the bug Sending message with adaptive card activity attached does not render on Facebook Messenger To Reproduce Steps ...
Read more >
Solved: Adaptive Card errors in MS Teams "We're sorry, thi...
That seems to have caused the problem. When I amended the JSON to be ver 1.2 and re-tested the card can through fine....
Read more >
Getting error when sending an adaptive card
Hi,. When trying to send an adaptive card in MS Teams Channel as per example given here, I'm getting a bad request error...
Read more >
Textnow bot
A Node library that allows TextNow messages to be sent ... Copy your Message JSON and post it on adaptive card designer with...
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