Issue: Exception in HostFunction: Malformed calls from JS: field sizes are different
Description
Environment
- React Native version: 0.72.12
- react-native-screens: 3.29.0
- @react-navigation/native: 6.1.8
- @react-navigation/native-stack: 6.11.0
Description
I'm encountering a consistent crash in my application with the following error:
ERROR Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.
[[7,104,104,107],[4,0,1,15],[[3556,2000,1741840689749,false],[3556],[3515,"onTransitionProgress",374]],8218]
This error occurs in the RNSScreen component during screen transitions. The full error stack trace shows it's happening within the navigation stack:
This error is located at: in RNSScreen in Unknown 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 SceneView) in SceneView (created by NativeStackViewInner) ...
Navigation Structure
My app uses a nested navigator structure:
-
RootNavigator: The top-level navigator that wraps everything in a NavigationContainer and OverlayProvider
export const RootNavigator = forwardRef((props, ref) => { const insets = useSafeAreaInsets() const topInset = Platform.select({ ios: insets.top, android: -heightScale(20) }) return ( <NavigationContainer {...props} ref={ref}> <OverlayProvider value={{ style: chatTheme }} topInset={topInset}> <RootStack /> </OverlayProvider> </NavigationContainer> ) }) -
RootStack: A native stack navigator with modal presentation
const RootStack = () => { return ( <Navigator screenOptions={{ headerShown: false, presentation: 'modal', }} > <Screen name="StackNavigator" component={MainStackNavigator} /> </Navigator> ) } -
MainStackNavigator: Handles authentication state and switches between auth and main flows
export const MainStackNavigator = () => { const { registrationInProgress } = useSnapshot(authStore.state) const { isAuthenticated } = useSnapshot(authStore.computed) return ( <Navigator screenOptions={{ headerShown: false }}> {isAuthenticated && !registrationInProgress ? ( <Screen name="MainNavigator" component={MainNavigator} /> ) : ( <Screen name="AuthNavigator" component={AuthNavigator} /> )} </Navigator> ) } -
MainNavigator: Contains all the screens for authenticated users
export const MainNavigator = () => { const { onBoardingInProgress } = useSnapshot(authStore.state) return ( <Navigator initialRouteName={onBoardingInProgress ? 'OnboardingScreen' : 'LandingScreen'} screenOptions={{ headerShown: false }} > <Screen name="StoryWatchScreen" component={StoryWatchScreen} options={{ gestureDirection: 'vertical', gestureEnabled: true, fullScreenGestureEnabled: true, }} /> {/* Many more screens... */} </Navigator> ) }
Expected Behavior
Screen transitions should work smoothly without any crashes or errors.
Attempted Solutions
I've tried the following approaches without success:
- Clearing cache and rebuilding the app
Any guidance would be greatly appreciated as this is blocking our development process.
Steps to reproduce
- Navigate to the StoryWatchScreen
- Attempt to dismiss the screen with a gesture
- The error occurs seemingly at random during screen transitions
- The app crashes with the above error message
Snack or a link to a repository
Screens version
3.29.0
React Native version
0.72.12
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Real device
Device model
iPhone 12
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Description and Snack or a link to a repository sections.