stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

Didn't find class "com.stripe.android.uicore.address.AddressRepository"

Open generosocarbone opened this issue 1 year ago • 0 comments
trafficstars

Describe the bug Suddenly, while presenting the payment sheet for adding a new card the app crashes.

To Reproduce

 const initPaymentSheetRes: InitPaymentSheetResult = await initPaymentSheet({
    merchantDisplayName: STRIPE_MERCHANT_ID,
    customerId: response.data.customerId,
    customerEphemeralKeySecret: response.data.customerEphemeralKeySecret,
    setupIntentClientSecret: response.data.setupIntentClientSecret,
    returnURL: 'appname://stripe-redirect',
    style: 'alwaysLight',
    billingDetailsCollectionConfiguration: {
      name: PaymentSheet.CollectionMode.ALWAYS,
      address: PaymentSheet.AddressCollectionMode.FULL
    },
    defaultBillingDetails: {
      name: `${user.data?.firstName} ${user.data?.lastName}`,
      phone: user.data?.phoneNumber
    }
})

console.log(initPaymentSheetRes)

const presentPaymentSheetRes = await presentPaymentSheet() << HERE IS THE CRASH

customerId, customerEphemeralKeySecret, and setupIntentClientSecret have the proper format.

Expected behavior No crash and payment sheet to appear

package.json:

  • "@stripe/stripe-identity-react-native": "0.2.11",
  • "@stripe/stripe-react-native": "^0.37.1",
  • "react-native": "0.73.4",

yarn.lock

  • "@stripe/[email protected]": version "0.2.11" resolved "https://registry.yarnpkg.com/@stripe/stripe-identity-react-native/-/stripe-identity-react-native-0.2.11.tgz#7d4c4d152e9f53dd4edfb4c747796691bf6d330b" integrity sha512-X9HnVVK2Q1RSm5RsDj2hFCBfGetdCuf22EucWrpUn3ZVPjJAKtToen3q3ohTUdbDAmJtxvFD31vMYN+t+28suA==

  • "@stripe/stripe-react-native@^0.37.1": version "0.37.3" resolved "https://registry.yarnpkg.com/@stripe/stripe-react-native/-/stripe-react-native-0.37.3.tgz#61e7e7ceffa2ba131bfb0340ff6e461ccfb6e543" integrity sha512-9OReixY4bP3ogHUoAmDs+FRKxTCCDz6APep6fn8LAzs5xG5IGDetFb7UlZkigFYqtJgbe3+n4kMS5wIcxKgnLQ==

Additional context

  1. Older stripe version "^0.36.0" works fine.
  2. I Already tried cleaning the cache or removing node_module

generosocarbone avatar Aug 07 '24 17:08 generosocarbone