Error Description:
TypeError: Cannot read property 'setupPurchases' of null
Environment Details:
- Platform: React Native (Expo)
- react-native-purchases version: 8.9.4
- React Native version: 0.76.9
- Expo version: ~52.0.42
- OS: Android
- Build type: Development
Error Context:
- Error occurs during RevenueCat SDK initialization
- Android Manifest includes the billing permission (com.android.vending.BILLING)
- Using Expo managed workflow with dev client (expo-dev-client ~5.0.19)
Steps to Reproduce:
1. Initialize RevenueCat SDK in app startup
2. Error occurs immediately during the Purchases.configure() call
3. The native module appears to be null when the app tries to access it
Additional Information:
- The app is using Expo Router for navigation
- RevenueCat configuration is attempted in the app root component
- Billing permission is correctly declared in AndroidManifest.xml
- Project is using the latest stable version of react-native-purchases
Attempted Solutions:
1. Verified billing permission in AndroidManifest.xml
2. Confirmed RevenueCat SDK is properly imported
3. Tried dynamic imports for the RevenueCat module
4. App is properly configured with dev client