Botframework-webchat: Markdown-It error in Adaptive Cards

Created on 27 Jan 2019  路  7Comments  路  Source: microsoft/BotFramework-WebChat

Hi Guys,
I am trying out the example 14.customization-piping-to-redux and pointing the bot to my custom bot on azure. It is throwing error at dispatchIncomingActivityMiddleware.js file return next(action); statement.

card-elements.js:5809 Uncaught Error: The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.

I tried updating the version of botframework to "botframework-webchat": ">= 4.2.1-0" in package.json and no luck. Any pointers to solve the issue?

Thanks,
Vishwa

front-burner

All 7 comments

Will investigate this one.

If I am correct, these are warnings but not errors. Adaptive Cards use console.error to write warnings. 馃槖

If i am not mistaken it is an update in the adaptive cards. They do not longer support the function "processMarkdown".

In version | Change description
-- | --
1.1 | Due to a security concern, the聽processMarkdown聽event handler has been聽REMOVED. Setting it will throw an exception that will halt your code. Please change your code to set the聽onProcessMarkdown(text, result)聽event handler instead (see example below.)

@SimSpfx I think we switched to the newer onProcessMarkdown function when we bump [email protected]. Need to find out why it still pump the warning.

Will be great if anyone can help investigate.

I am using v4.2.0 and it is still in the file AdaptiveCardRenderer.js,

image

perhaps did not commit? Or i am doing something wrong :)

Observed the same issue with 2.customization-minimizable-web-chat after setting botframework-webchat to 4.2.0 (didn't work at all with checked-in package*.json files).

After replacing .processMarkdown with .onProcessMarkdown in AdaptiveCardRenderer.js:144 and AdaptiveCardRenderer.js:92 the error no longer occurs. At least works as a quick fix.

After reading @SimSpfx and @Michaelvsk 's comments, I believe this is an issue because the fix is in '/master/' bits but not on '/latest/' yet. When looking at the latest bits adaptiveCardRenderer.js, the project is using onProcessMarkdown. We will keep this issue open until 4.3 is available to the public to confirm that the bug is fixed in our next release.

For those looking for an immediate fix, please see @Michaelvsk's workaround, or please feel free to use our /master/ bits until the next release.

I have had offline confirmation that this fix is working for our customers. If you find you are still having this issue, please leave a comment on this thread and I will reopen as we investigate. Thank you everyone!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prashanthsridhar picture prashanthsridhar  路  3Comments

AndreMantas picture AndreMantas  路  4Comments

felixhauserch picture felixhauserch  路  3Comments

corinagum picture corinagum  路  3Comments

Stardox picture Stardox  路  3Comments