Skip to main content

Hello, Im having issues with opening Paywall V2 inside Expo app (Android). On iOS it works totally fine but on Android the app crashes (the screen becomes black).
Here is the code for my modal:
```

import { useRouter } from 'expo-router';

import { View } from 'react-native';

import RevenueCatUI from 'react-native-purchases-ui';

 

export default function Paywall() {

const router = useRouter();

 

return (

<View className='flex-1'>

<RevenueCatUI.Paywall

options={{

displayCloseButton: true,

}}

onDismiss={() => {

router.back();

}}

/>

</View>

);

}
```

Deps:
```
"expo": "^53.0.9",

"react-native": "0.79.2",

"react-native-purchases": "8.10.1",

"react-native-purchases-ui": "8.10.1",
```
Important note: It also didn't work on Expo SDK 52 and RN 0.77

Additional small details:
1. App has Closed testing on Google Play​​​​​​​
2. Both Google or Sentry didnt report any crashes, even though the app doesnt respond.


Fixed by using RevenueCatUI.presentPaywall instead of RevenueCatUI.Paywall.


@igor-410d60 I believe that you could be experiencing this issue: https://github.com/RevenueCat/react-native-purchases/issues/1162

In short, some people have experienced issues (crashes/hangs) when using RevenueCatUI.Paywall in projects which use react-navigation.

Our team is actively working on a fix, which should be available in a release soon.


@chris_perriam Hello! Yes, it was the cause. Luckily I just switched to presentPaywall and it was enough for my app 🙂 Thank you for your answer!