Skip to content

App crashes on parsing payload React Native v0.75 #133

Description

@pl59372019

Target Platforms

iOS

SDK Version

2.2.36

Application Name

React native app

Problem Description

Upon rendering of AdaptiveCard, app crashes with the following error in console, detail errors are in screenshots:

ERROR TypeError: Cannot read property 'style' of undefined, js engine: hermes
ERROR Warning: TypeError: Cannot read property 'InputText' of undefined

Note: React Native v0.75

Screenshots

Log 1 of 5
Log 2 of 5
Log 3 of 5
Log 4 of 5
Log 5 of 5

Card JSON

{
  $schema: 'http://adaptivecards.io/schemas/adaptive-card.json',
  type: 'AdaptiveCard',
  version: '1.6',
  body: [
    {
      type: 'Container',
      items: [
        {
          type: 'Image',
          url: 'https://adaptivecards.io/content/cats/1.png',
          altText: 'Cat',
          spacing: 'Padding',
          horizontalAlignment: 'Center',
        },
      ],
    },
  ],
}

Sample Code Language

typescript

Sample Code

import React, { useRef } from 'react';
import { AdaptiveCard } from 'adaptivecards-reactnative';

const samplePayload = {
$schema: 'http://adaptivecards.io/schemas/adaptive-card.json',
type: 'AdaptiveCard',
version: '1.6',
body: [
{
type: 'Container',
items: [
{
type: 'Image',
url: 'https://adaptivecards.io/content/cats/1.png',
altText: 'Cat',
spacing: 'Padding',
horizontalAlignment: 'Center',
},
],
},
],
};

export const CSIAdaptiveCard: React.FC<> = () => {

const onExecuteAction = (action: any) => {
// Handle action execution here
console.log('Action executed:', action);
};
const onParseError = (error: any) => {
// Handle parse error here
console.error('Parse error:', error);
};
return (

);
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions