Skip to content

Crash in PaymentSheet.presentWithPaymentIntent after upgrading stripe-terminal-android from 5.0.0 to 5.1.0 #662

@rdlabo

Description

@rdlabo

Summary

I am a maintainer of @capacitor-community/stripe, an open-source Capacitor plugin that wraps stripe-android and stripe-terminal-android.

After upgrading stripe-terminal-android from 5.0.0 to 5.1.0, apps using our plugin crashing when calling
PaymentSheet.presentWithPaymentIntent from stripe-android.

This issue impacts users integrating both Stripe Terminal and PaymentSheet on Android.

The crash did not occur with stripe-terminal-android 5.0.0.

Code to reproduce

  1. Add stripe-terminal-android:5.1.0
  2. Initialize Stripe Terminal
  3. Call PaymentSheet.presentWithPaymentIntent(...)
  4. The app crashes during PaymentSheet UI inflation

Crash log:

FATAL EXCEPTION: main
Process: com.capacitor.stripe, PID: 18676
android.view.InflateException: Binary XML file line #13 in
com.capacitor.stripe:layout/stripe_fragment_primary_button_container:
Error inflating class com.stripe.android.paymentsheet.ui.PrimaryButton
Caused by: java.lang.reflect.InvocationTargetException

Downgrading stripe-terminal-android to 5.0.0, or removing it entirely, resolves the issue.

Android version

  • Android16

Impacted devices (Android devices or readers)

SDK version

  • com.stripe:stripe-android: 22.4.+
  • com.stripe:stripeterminal-core: 5.1.+
  • com.stripe:stripeterminal-taptopay: 5.1.+
  • com.stripe:stripeterminal-appsondevices: 5.1.+

Note: This issue does not occur in 5.0.0

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    Tap to PayIssues with the Stripe Tap to Pay on Android readerbugbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions