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.

Incompatibility with bot framework 4.2.0+

See original GitHub issue

Target Platforms

Other

SDK Version

1.4.0

Application Name

all

Problem Description

Since BF was updated to use ANTLR 4.11.1 (in 4.2.0) it is no longer possible to use new AdaptiveCardTemplate(json) in the same project

It fails with this error:

      System.TypeInitializationException: The type initializer for 'AdaptiveCardsTemplateLexer' threw an exception.
       ---> System.MissingMethodException: Method not found: 'Antlr4.Runtime.Atn.ATN Antlr4.Runtime.Atn.ATNDeserializer.Deserialize(Char[])'.
         at AdaptiveCardsTemplateLexer..cctor()
         --- End of inner exception stack trace ---
         at AdaptiveCardsTemplateLexer..ctor(ICharStream input)
         at AdaptiveCards.Templating.AdaptiveCardTemplate..ctor(Object jsonTemplate)

Screenshots

No response

Card JSON

Example, but all fail:

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.5",
    "body": [
        {
            "type": "TextBlock",
            "text": "this doesnt work",
            "wrap": true
        }
    ]
}

Sample Code Language

C# (dotnet core)

Sample Code

I have created a repro below:

https://github.com/jamesemann/adaptive-cards-incompatibility

If you dotnet run, you will see:

❯ dotnet run
Unhandled exception. System.TypeInitializationException: The type initializer for 'AdaptiveCardsTemplateLexer' threw an exception.
 ---> System.MissingMethodException: Method not found: 'Antlr4.Runtime.Atn.ATN Antlr4.Runtime.Atn.ATNDeserializer.Deserialize(Char[])'.
   at AdaptiveCardsTemplateLexer..cctor()
   --- End of inner exception stack trace ---
   at AdaptiveCardsTemplateLexer..ctor(ICharStream input)
   at AdaptiveCards.Templating.AdaptiveCardTemplate..ctor(Object jsonTemplate)
   at Repro.DoesItWork.Main() in C:\repos\templatingrepro\Repro\Repro\Program.cs:line 9
   at Repro.DoesItWork.<Main>()

Issue Analytics

  • State:open
  • Created 2 months ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jwoo-msftcommented, Aug 21, 2023

@jamesemann,

I will update SDK to use ANTLR 4.11.1

0reactions
jamesemanncommented, Aug 21, 2023

@anna-dingler would it be possible to triage this issue please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix this error? Incompatible mod set! net.fabricmc. ...
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or...
Read more >
BOT Framework Advantages of V4 over V3
The central idea here is that v4 gives you more flexibility as a developer. The new state management system allows you to choose...
Read more >
What .net version is compatible with bot framework
The Microsoft Bot Framework supports .NET Framework 4.6.1 or later, and .NET Core 2.1 or later. If you are using the Bot Builder...
Read more >
botframework-webchat/README.md
The Bot Framework Web Chat component is a highly-customizable web-based client for the Bot Framework V4 SDK. The Bot Framework SDK v4 enables...
Read more >
Microsoft.Bot.Builder 4.20.1
Version Downloads Last updated 4.20.1 18,409 a month ago 4.20.0 24,383 3 months ago 4.19.3 102,387 6 months ago
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