Expo crashing navigating with params on Android

The next code is making Expo crash on Android without any error:

navigation.navigate(‘ShowScreen’, { name: ‘sss’ })

on my Stack.Navigator:

<Stack.Screen name=“ShowScreen” component={ShowScreen} options={({ route }) => ({ title: route.params.name })} initialParams={{ name: ‘’ }}/>

my types.tsx: (RootStackParamList)

ShowScreen: { name: string };

More info:

It is working on ios and web, but on Android expo crash without any error, how can I get more info of the error? Also works fine if I remove params but sending params blow up before open the modal.

use adb logcat or one of the suggestions from Viewing logs - Expo Documentation to see what the error is. react-native is not particularly resilient to crashes on android

adb logcat is not showing any error neither, android just show app has crashed and expo is closing, I tried creating a new device with an older android OS and same… I don’t know how to pass parameters to a modal screen on Android.

I could finally realized without any log that the issue is using TouchableOpacity navigating with params, Presable is working ok on Android

<TouchableOpacity onPress={() => navigation.navigate(‘ScreenCard’, {name: ‘www’})} >

//Not Working

      <Pressable //Working
        onPress={() => navigation.navigate('ScreenCard', {name: 'www'})}
        style={({ pressed }) => ({
          opacity: pressed ? 0.5 : 1,
        <ScreenCard ></ScreenCard>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.