Skip to content

Android app crashes on - ActivityTaskManager timeout and StripeKeepJsAwakeTask error presentPaymentSheet() #1981

Open
@DimaNovik

Description

@DimaNovik

Our React Native Android application crashes when calling the method from the Stripe React Native SDK. The crash occurs consistently on Android devices with ActivityTaskManager timeout and StripeKeepJsAwakeTask warning. presentPaymentSheet

To Reproduce Steps to reproduce the behavior:

  1. Go to payment screen in the app
  2. Fill in payment form and tap 'Pay' button
  3. App calls initPaymentSheet() (works correctly)
  4. App calls presentPaymentSheet()
  5. See error - app crashes immediately

Expected behavior The Stripe payment sheet should open, allowing users to complete their payment without the app crashing.
Error Logs

06-25 14:56:01.764   498   516 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{4781c8 u0 com.railmonsters/com.stripe.android.paymentsheet.PaymentSheetActivity} t-1 f}}

WARN  No task registered for key StripeKeepJsAwakeTask

Screenshots N/A - App crashes before any UI is displayed
Desktop (please complete the following information):

  • OS: macOS Sonoma (aarch64)
  • IDE: WebStorm 2025.1.2
  • Development environment: React Native CLI

Smartphone (please complete the following information):

  • Device: Multiple Android devices tested
  • OS: Android 10-14
  • Testing: Both physical devices and emulators
  • Version: Consistent across all tested versions

Environment Information:

  • @stripe/stripe-react-native: 0.48.0
  • React Native: 0.76.5
  • React: 18.3.1
  • TypeScript: 5.7.2
  • Android Target SDK: 34
  • Android Compile SDK: 35
  • Android Min SDK: 24
  • Build Tools: 35.0.0
  • Kotlin: 2.0.21
  • Hermes: Enabled

Additional context

  • iOS works perfectly with identical code
  • initPaymentSheet() completes successfully, only crashes presentPaymentSheet()
  • Issue occurs in both debug and release builds
  • Using test publishable key:
  • Tried clean builds, Metro cache reset, and dependency updates
  • The "StripeKeepJsAwakeTask" warning suggests a background task registration issue
  • ActivityTaskManager timeout indicates PaymentSheetActivity lifecycle problems
  • App uses splash screen and custom MainActivity configuration
  • Could be related to React Native 0.76.5 compatibility issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions