Skip to content

Android crash when launching RevenueCat / Play Billing UI from nested routes (Expo SDK 52, expo-router 4.0.2) #1486

@athulmohan2

Description

@athulmohan2

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.

  1. Environment
    1. Platform:android
    2. SDK version:9.6.4
    3. OS version:15
    4. Xcode/Android Studio version:
    5. React Native version:0.76.9
    6. SDK installation (CocoaPods + version or manual):
    7. How widespread is the issue. Percentage of devices affected.
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions