Adaptivecards: [JavaScript] TypeError: Cannot read property 'registerType' of undefined using adaptivecard-fabric

Created on 31 Jul 2020  路  4Comments  路  Source: microsoft/AdaptiveCards

Platform

  • JavaScript

Version of SDK

latest

Details

I was trying to style my adaptive cards using module adaptivecards-fabric as mentioned in the repo by using

    ACFabric.useFabricComponents();

but Iam getting the following error

TypeError: Cannot read property 'registerType' of undefined

I checked the AdaptiveCard class definition in node modules and could not find any property elementTypeRegistry.

Can someone help me with this issue? Or can someone tell me if there is any other way to style adaptive cards using fabric ui?

Here is the whole stack trace:

```Fabric.js:17 Uncaught (in promise) TypeError: Cannot read property 'registerType' of undefined
at Object.t.useFabricComponents (Fabric.js:17)
at t.componentDidMount (ImmersiveIframe.tsx:32)
at us (react-dom.production.min.js:212)
at Tl (react-dom.production.min.js:255)
at t.unstable_runWithPriority (scheduler.production.min.js:19)
at Go (react-dom.production.min.js:122)
at wl (react-dom.production.min.js:248)
at pl (react-dom.production.min.js:239)
at react-dom.production.min.js:123
at t.unstable_runWithPriority (scheduler.production.min.js:19)

Bug

Most helpful comment

@sadviramana for now the Fabric integration is not yet compatible with the AC SDK v2.0 and later. We do know this is a problem and are working to find the right people to update the Fabric integration library.

All 4 comments

Hi @sadviramana. We have acknowledged this issue report. Please continue to follow this issue for updates/progress/questions.

@sadviramana for now the Fabric integration is not yet compatible with the AC SDK v2.0 and later. We do know this is a problem and are working to find the right people to update the Fabric integration library.

Met the same issue, looking forward to have you fix

@futurechallenger You can try using the adaptive cards version 1.2.6. The problem is with the latest version v2.0.

Was this page helpful?
0 / 5 - 0 ratings