Android crash when launching RevenueCat / Play Billing UI from nested routes (Expo SDK 52, expo-router 4.0.2)
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have searched the Community
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
Describe the bug
Short: The app process crashes on Android when starting a RevenueCat purchase flow if the Pricing / Premium screen is reached via nested modal/formSheet routes (e.g. Home → Settings (formSheet) → Plan → Upgrade → Pricing → Purchase). The same Pricing screen works if opened from Home (full-screen). The crash occurs immediately after the Google Play purchase loader appears.
Observed behavior
Works: Home → Upgrade → Pricing → Purchase (no crash).
Fails: Home → Settings (formSheet) → Plan → Upgrade → Pricing → Purchase (app closes right after Google Play purchase loader appears).
The old premium/index screen (from a prior working project) also crashes when placed into the new project, which indicates the cause is project-level (navigation/lifecycle/native) rather than the premium screen’s code.
Defensive changes (dismiss modal before navigation, useIsFocused, InteractionManager.runAfterInteractions, small delays, initializing Purchases early) were tried but crash persists in the new project.
- Environment
- Platform:android
- SDK version:9.6.4
- OS version:15
- Xcode/Android Studio version:
- React Native version:0.76.9
- SDK installation (CocoaPods + version or manual):
- How widespread is the issue. Percentage of devices affected.
- Debug logs that reproduce the issue
- Steps to reproduce, with a description of expected vs. actual behavior
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Hi @athulmohan2, thanks for reporting!
- Could you share a stack trace of the crash?
- The premium screen you're referring to, is that a RevenueCat Paywall?