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

[Parse] Unknown element type "CodeBlock". Fallback will be used if present. #11901

Open
ryeleo opened this issue Dec 6, 2024 · 2 comments
Open
Assignees
Labels
needs-author-feedback Needs more info from the customer. teams-developer-support Question related to extensibility (Bot, ME, Tab) would be marked under this label

Comments

@ryeleo
Copy link

ryeleo commented Dec 6, 2024

Type of issue

Code doesn't work

Feedback

I'm testing "CodeBlock" in my adaptive card, but it is failing to render with the following exception:

Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: The specified Teams flowbot adaptive card request is missing or invalid. The tracking Id is '{0}'. ---> System.InvalidCastException: Unable to cast object of type 'AdaptiveCards.AdaptiveUnknownAction' to type 'AdaptiveCards.AdaptiveElement'.
   at AdaptiveCards.IgnoreEmptyItemsConverter`1.<>c.<ReadJson>b__1_3(Object value)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Populate(JsonReader reader, Object target)
   at AdaptiveCards.AdaptiveTypedElementConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at AdaptiveCards.AdaptiveCardConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at AdaptiveCards.AdaptiveCard.FromJson(String json)
   at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in C:\__w\1\s\src\processsimple\Roles\ProcessSimple.Data\Components\AdaptiveCards\AdaptiveCardBuilder.cs:line 750
   --- End of inner exception stack trace ---
   at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in C:\__w\1\s\src\processsimple\Roles\ProcessSimple.Data\Components\AdaptiveCards\AdaptiveCardBuilder.cs:line 754
   at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity) in C:\__w\1\s\src\processsimple\Roles\ProcessSimple.Data\Common\Validation\BotValidation.cs:line 943

When I try to paste the example CodeBlock from this document into MSFT Adaptive Card Designer (v1.5), I get the following error:

[Parse] Unknown element type "CodeBlock". Fallback will be used if present.

Screenshot of "Unknown element type "CodeBlock"" error in MSFT Adaptive Card Designer (v1.5)

Page URL

https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-format?tabs=adaptive-md%2Cdesktop%2Cdesktop1%2Cdesktop2%2Cconnector-html

Content source URL

https://github.com/MicrosoftDocs/msteams-docs/blob/main/msteams-platform/task-modules-and-cards/cards/cards-format.md

Author

@surbhigupta

Document Id

e5f5f69e-66e9-d1b2-e19a-485d0ffcd6fa

Copy link
Contributor

Hi ryeleo! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

@Meghana-MSFT Meghana-MSFT self-assigned this Dec 9, 2024
@Meghana-MSFT Meghana-MSFT added teams-developer-support Question related to extensibility (Bot, ME, Tab) would be marked under this label and removed needs-triage 🔍 labels Dec 9, 2024
@Meghana-MSFT
Copy link
Collaborator

@ryeleo - We sent the above-mentioned card through bot and it is rendering fine in Teams Desktop. Could you please let us know how you are sending the card and testing this.

image

@Meghana-MSFT Meghana-MSFT added the needs-author-feedback Needs more info from the customer. label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-author-feedback Needs more info from the customer. teams-developer-support Question related to extensibility (Bot, ME, Tab) would be marked under this label
Projects
None yet
Development

No branches or pull requests

2 participants