Skip to content

Android - Cannot read property 'StripeProvider' of undefined #2000

@Mhd-Emad

Description

@Mhd-Emad

Describe the bug
When trying to import and use the StripeProvider from the @stripe/stripe-react-native package, the app crashes with the error:
Cannot read property 'StripeProvider' of undefined.
This suggests that the package is either not linked correctly or not properly initialized.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new React Native project (e.g., using npx react-native init).
  2. Install @stripe/stripe-react-native.
  3. Import StripeProvider from @stripe/stripe-react-native.
  4. Use component in your app.
  5. Run the app.
  6. See the error in the console or app crash.

Expected behavior
The component should be properly imported and usable without causing runtime errors.

Desktop (please complete the following information):

  • OS: [macos sequoia 15.5]
  • Node version: [20.15.0]
  • React Native version: [0.80.1]
  • Stripe React Native version: [^0.49.0]

Smartphone (please complete the following information):

  • Device: [Emulators and real devices]
  • OS: [Android]

Additional context

  • The package is installed via npm.
  • Tried cleaning build cache, reinstalling node_modules, and rebuilding the app.
  • The error occurs immediately upon rendering the component.

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