Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React-Native - Boolean/String Type Mismatch Error #3800

Open
Cian-LP opened this issue Dec 23, 2024 · 0 comments
Open

React-Native - Boolean/String Type Mismatch Error #3800

Cian-LP opened this issue Dec 23, 2024 · 0 comments

Comments

@Cian-LP
Copy link

Cian-LP commented Dec 23, 2024

Describe the bug
When rendering Builder.io content using the Content component in React Native with the new architecture (Fabric), there's a type mismatch error where a boolean prop is being passed as a string. The error specifically states: "TypeError: expected dynamic type 'boolean', but had type 'string'"

To Reproduce
Steps to reproduce the behavior:

  1. Set up a React Native project with Builder.io SDK
  2. Create a blog post content model in Builder.io
  3. Fetch content using fetchOneEntry
  4. Attempt to render the content using the Content component
  5. Error occurs during render of RCTView component

Expected behavior
The Builder.io content should render properly in the React Native app without any type mismatch errors. The Content component should properly handle and convert prop types between native and JavaScript layers.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context

  • Using React Native's v0.76.5 and expo 52 with the new architecture.
  • Using @builder.io/sdk-react-native v3.0.0 and have tested v2.0.13, both have displayed this error.

I've attached the full error below

 (NOBRIDGE) ERROR  Warning: Error: Exception in HostFunction: TypeError: expected dynamic type `boolean', but had type `string'

This error is located at:
    in RCTView (created by View)
    in View (created by DynamicRenderer)
    in DynamicRenderer (created by BlockWrapper)
    in BlockWrapper (created by Block)
    in Block (created by Blocks)
    in RCTScrollContentView (created by ScrollView)
    in RCTScrollView
    in VScrollViewNativeComponent (created by ScrollView)
    in ScrollView (created by ScrollView)
    in Wrapper (created by BlocksWrapper)
    in BlocksWrapper (created by Blocks)
    in Blocks (created by ContentComponent)
    in RCTScrollContentView (created by ScrollView)
    in RCTScrollView
    in VScrollViewNativeComponent (created by ScrollView)
    in ScrollView (created by ScrollView)
    in Wrapper (created by EnableEditor)
    in EnableEditor (created by ContentComponent)
    in ContentComponent (created by ContentVariants)
    in ContentVariants (created by BlogPost)
    in RCTView (created by View)
    in View (created by BlogPost)
    in BlogPost
    in Unknown (created by Route([slug]))
    in Suspense (created by Route([slug]))
    in Route (created by Route([slug]))
    in Route([slug]) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by NativeStackNavigator)
    in RNSScreenContentWrapper (created by ScreenContentWrapper)
    in ScreenContentWrapper (created by DebugContainer)
    in DebugContainer
    in RNSScreen (created by Animated(Anonymous))
    in Animated(Anonymous)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze
    in InnerScreen (created by Screen)
    in Screen
    in ScreenStackItem (created by SceneView)
    in SceneView (created by NativeStackView)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by ScreenStack)
    in RNSScreenStack (created by ScreenStack)
    in Unknown (created by ScreenStack)
    in ScreenStack (created by NativeStackView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by NativeStackView)
    in NativeStackView (created by NativeStackNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by NativeStackNavigator)
    in NativeStackNavigator
    in Unknown (created by LearnLayout)
    in LearnLayout
    in Unknown (created by Route(learn))
    in Suspense (created by Route(learn))
    in Route (created by Route(learn))
    in Route(learn) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by BottomTabNavigator)
    in RCTView (created by View)
    in View (created by Screen)
    in RCTView (created by View)
    in View (created by Animated(View))
    in Animated(View) (created by Background)
    in Background (created by Screen)
    in Screen (created by BottomTabView)
    in RNSScreen (created by Animated(Anonymous))
    in Animated(Anonymous)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze
    in InnerScreen (created by Screen)
    in Screen (created by MaybeScreen)
    in MaybeScreen (created by BottomTabView)
    in RNSScreenNavigationContainer (created by ScreenContainer)
    in ScreenContainer (created by MaybeScreenContainer)
    in MaybeScreenContainer (created by BottomTabView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by BottomTabView)
    in BottomTabView (created by BottomTabNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by BottomTabNavigator)
    in BottomTabNavigator
    in Unknown (created by TabsLayout)
    in TabsLayout
    in Unknown (created by Route((tabs)))
    in Suspense (created by Route((tabs)))
    in Route (created by Route((tabs)))
    in Route((tabs)) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by NativeStackNavigator)
    in RNSScreenContentWrapper (created by ScreenContentWrapper)
    in ScreenContentWrapper (created by DebugContainer)
    in DebugContainer
    in RNSScreen (created by Animated(Anonymous))
    in Animated(Anonymous)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze
    in InnerScreen (created by Screen)
    in Screen
    in ScreenStackItem (created by SceneView)
    in SceneView (created by NativeStackView)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by ScreenStack)
    in RNSScreenStack (created by ScreenStack)
    in Unknown (created by ScreenStack)
    in ScreenStack (created by NativeStackView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by NativeStackView)
    in NativeStackView (created by NativeStackNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by NativeStackNavigator)
    in NativeStackNavigator
    in Unknown (created by Layout)
    in Layout
    in Unknown (created by Route((app)))
    in Suspense (created by Route((app)))
    in Route (created by Route((app)))
    in Route((app)) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by SlotNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by SlotNavigator)
    in SlotNavigator (created by Slot)
    in Slot (created by Root)
    in RCTView (created by View)
    in View (created by GestureHandlerRootView)
    in GestureHandlerRootView (created by Root)
    in UserProvider (created by ParentProvider)
    in NetworkProvider (created by ParentProvider)
    in SupabaseProvider (created by ParentProvider)
    in ParentProvider (created by Root)
    in Root
    in Try
    in Unknown
    in Unknown (created by Route())
    in Suspense (created by Route())
    in Route (created by Route())
    in Route() (created by ContextNavigator)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by wrapper)
    in wrapper (created by ContextNavigator)
    in ThemeProvider
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in NavigationContainerInner (created by ContextNavigator)
    in ContextNavigator (created by ExpoRoot)
    in ExpoRoot (created by App)
    in App (created by ErrorOverlay)
    in ErrorToastContainer (created by ErrorOverlay)
    in ErrorOverlay (created by withDevTools(ErrorOverlay))
    in withDevTools(ErrorOverlay)
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant