react-native-marked icon indicating copy to clipboard operation
react-native-marked copied to clipboard

[React Compiler]: Crash when using react-compiler in release build

Open FightFarewellFearless opened this issue 11 months ago • 2 comments

Describe the bug The application is crashed when using react-compiler with release build (somehow it works on debug build). Still crashed even if "use no memo" is added. Maybe this is caused by @jsamr/react-native-li used in this lib, which is 3 years old with no update.

To Reproduce

  1. Setup react-compiler, i'm following the guide in the expo docs, because i'm using expo bare workflow
  2. Build the application in release build

Reproducible Code

import Markdown from "react-native-marked";
import CHANGELOG from "../../../../CHANGELOG.md";

export default function Changelog() {
    "use no memo";
    return (
        <Markdown
            value={CHANGELOG}
        />
    )
}

and here is my babel.config.js

const ReactCompilerConfig = {
  target: '18', // '17' | '18' | '19'
  sources: (filename) => {
    return filename.includes('src/component');
  },
};

module.exports = {
  presets: [
    ['babel-preset-expo', {
      'react-compiler': ReactCompilerConfig
    }]
  ],
  // eslint-disable-next-line prettier/prettier
  plugins: [
    ['module:react-native-dotenv'],
    [
      "babel-plugin-inline-import",
      {
        "extensions": [".md", ".txt"]
      }
    ],
    'react-native-reanimated/plugin',
  ],
};

Expected behavior Expected to working fine

  • React Native Version: 0.77

  • react-native-marked Version: 6.0.7

  • Platform: Android

Additional context Here is the log

log

02-02 17:23:22.241 7180 7222 E ReactNativeJS: TypeError: undefined is not a function 02-02 17:23:22.241 7180 7222 E ReactNativeJS: 02-02 17:23:22.241 7180 7222 E ReactNativeJS: This error is located at: 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in MarkedListItem 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in VirtualizedListCellContextProvider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in CellRenderer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTScrollView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in ScrollView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Wrapper 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in VirtualizedListContextProvider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in VirtualizedList 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in FlatList 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Markdown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Changelog 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in StaticContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in EnsureSingleNavigator 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in SceneView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in CardSheet 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in PanGestureHandler 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in PanGestureHandler 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Card 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in CardContainerInner 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNSScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Suspender 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Suspense 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Freeze 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in DelayedFreeze 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in InnerScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in MaybeScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNSScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in ScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in MaybeScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in CardStack 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in SafeAreaProviderCompat 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNGestureHandlerRootView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in GestureHandlerRootView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in StackView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in PreventRemoveProvider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in NavigationContent 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in StackNavigator 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Utils 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in StaticContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in EnsureSingleNavigator 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in SceneView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Background 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Screen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNSScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Suspender 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Suspense 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Freeze 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in DelayedFreeze 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in InnerScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in MaybeScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNSScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in ScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in MaybeScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in SafeAreaProviderCompat 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in BottomTabView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in PreventRemoveProvider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in NavigationContent 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in BottomTabNavigator 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in BottomTabs 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in StaticContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in EnsureSingleNavigator 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in SceneView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in CardSheet 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in PanGestureHandler 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in PanGestureHandler 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Card 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in CardContainerInner 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNSScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Suspender 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Suspense 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Freeze 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in DelayedFreeze 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in InnerScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in MaybeScreen 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNSScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in ScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in MaybeScreenContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in CardStack 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNCSafeAreaProvider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in SafeAreaProvider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in SafeAreaProviderCompat 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNGestureHandlerRootView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in GestureHandlerRootView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in StackView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in PreventRemoveProvider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in NavigationContent 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in StackNavigator 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Provider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in ThemeProvider 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in EnsureSingleNavigator 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in BaseNavigationContainer 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in NavigationContainerInner 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RNGestureHandlerRootView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in GestureHandlerRootView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in App 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in RCTView 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in Unknown 02-02 17:23:22.241 7180 7222 E ReactNativeJS: in AppContainer

FightFarewellFearless avatar Feb 02 '25 12:02 FightFarewellFearless

I'll check it

gmsgowtham avatar Feb 04 '25 08:02 gmsgowtham

I'll check it

Thank you, make sure there are lists in the markdown to reproduce the issue

FightFarewellFearless avatar Feb 04 '25 08:02 FightFarewellFearless

I'm not sure if react compiler, I also have an issue that rendering lists causes the app to freeze and memory climbing indefinitely. Only if I return null in a custom list the freezing stops, even console logging the li in a custom renderer causes the freezing. Im on the 7.0.1 RC

lauridskern avatar May 04 '25 15:05 lauridskern

Any updates on this issue? Blocked on this while upgrading expo.

VaibhavAcharya avatar May 15 '25 06:05 VaibhavAcharya

list( ordered: boolean, li: ReactNode[], listStyle?: ViewStyle, textStyle?: TextStyle, startIndex?: number, ): ReactNode { return <View style={listStyle}>{li.map((node) => node)}</View>; }

i am doing this in a custom renderer as workaround

markwitt1 avatar May 19 '25 18:05 markwitt1

@lauridskern @VaibhavAcharya Can you please share a small reproduction and the env? I'll try to check it over the weekend

gmsgowtham avatar May 20 '25 07:05 gmsgowtham

confirmed this issue still occurred with react-native-marked 7.0.1, react-native 0.79, and react 19. The error message is

TypeError: undefined is not a function
at MarkedListItem (address at .......)

FightFarewellFearless avatar Jun 27 '25 09:06 FightFarewellFearless

Can you please test using 7.0.2-rc.0?. Post confirmation will release to primary channel.

@FightFarewellFearless @lauridskern @VaibhavAcharya @markwitt1

gmsgowtham avatar Jun 27 '25 16:06 gmsgowtham

Can you please test using 7.0.2-rc.0?. Post confirmation will release to primary channel.

@FightFarewellFearless @lauridskern @VaibhavAcharya @markwitt1

Yup, it works 💪 thank you!

FightFarewellFearless avatar Jun 28 '25 04:06 FightFarewellFearless

Issue addressed with v7.0.2

gmsgowtham avatar Jun 28 '25 05:06 gmsgowtham