This repository was archived by the owner on Dec 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
Error in Sending Adaptive Card with People Picker to Message #1476
Copy link
Copy link
Open
Labels
Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.Required for internal Azure reporting. Do not delete. Do not change color.ExemptFromDailyDRIReportUse this label to exclude the issue from the DRI report.Use this label to exclude the issue from the DRI report.bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.Indicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.Issue is created by anyone that is not a collaborator in the repository.
Metadata
Metadata
Assignees
Labels
Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.Required for internal Azure reporting. Do not delete. Do not change color.ExemptFromDailyDRIReportUse this label to exclude the issue from the DRI report.Use this label to exclude the issue from the DRI report.bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.Indicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.Issue is created by anyone that is not a collaborator in the repository.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
What package version of the SDK are you using.
4.14.2
Describe the bug
Give a clear and concise description of what the bug is.
When sending message using adaptive card that contains a People Picker with dataset, Activity can't be serialized (FlatterningSerializer throws error):
Caused by: java.lang.ClassCastException: class com.fasterxml.jackson.databind.node.ArrayNode cannot be cast to class com.fasterxml.jackson.databind.node.ObjectNode (com.fasterxml.jackson.databind.node.ArrayNode and com.fasterxml.jackson.databind.node.ObjectNode are in unnamed module of loader 'app')
at com.microsoft.bot.restclient.serializer.FlatteningSerializer.serialize(FlatteningSerializer.java:187) ~[bot-connector-4.14.2.jar:4.14.2]
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480) ~[jackson-databind-2.13.3.jar:2.13.3]
... 27 common frames omitted
To Reproduce
Steps to reproduce the behavior:
1 Prepare an adaptive card containing People Picker:
{ "type": "Input.ChoiceSet", "choices": [], "choices.data": { "type": "Data.Query", "dataset": "graph.microsoft.com/users?scope=currentContext" }, "isMultiSelect": true, "placeholder": "Choose at least one person for this feedback", "label": "Request to", "style": "filtered", "id": "userId" },Expected behavior
Give a clear and concise description of what you expected to happen.
Expect adaptive card to be sent to chat
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The same adaptive card works for Task Module.
The problem is in FlatterningSerializer, where it tries to flat "choices.data", how ever, this can't be done, for the expected flatterned data is:
but there's already a
choices: []existing. These two can't match.