flutter-stripe / flutter_stripe

Flutter SDK for Stripe.
https://pub.dev/packages/flutter_stripe
961 stars 532 forks source link

When calling initPaymentSheet with the customFlow flag again, the application hangs #1962

Open kirill09 opened 1 month ago

kirill09 commented 1 month ago

When calling initPaymentSheet with the customFlow flag again, the application hangs

Steps to reproduce the behavior: In the example, the following steps need to be done.

  1. Custom Flow
  2. Init payment sheet
  3. Select payment method
  4. Add card 4242 4242 4242 4242(does not matter)
  5. Pay now We receive a successful payment.
  6. Init payment sheet Stripe.instance.initPaymentSheet method does not complete its work.

Stripe.instance.initPaymentSheet method completed successfully

https://github.com/user-attachments/assets/61f4360e-3d35-4a10-965d-d263c2a5a353

An exception is raised that is not handled anywhere. com/stripe/android/paymentsheet/repositories/ElementsSessionRepository.kt:58 Failure(kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelling}@30f3594)

remonh87 commented 1 month ago

@jonasbark I can reproduce this issue can you check if it is something in the Android factory?