Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSubmit not called after an error (Android only) #365

Open
gunnartorfis opened this issue Feb 8, 2024 · 6 comments
Open

onSubmit not called after an error (Android only) #365

gunnartorfis opened this issue Feb 8, 2024 · 6 comments
Labels
question Further information is requested

Comments

@gunnartorfis
Copy link
Contributor

Describe the bug
When attempting to pay using the Card Component and payments fails, when the user tries to pay for the second time with a different card details, the native spinner shows up and is infinite. None of onSubmit, onError, onAdditionalDetails is called.

This is only happening on Android, not iOS or the web for us.

To Reproduce
Steps to reproduce the behavior:

  1. Pay with a card that leads to a payment failure
  2. Try to pay again with a different card
  3. Observe the infinite spinning state

Expected behavior
We should also get an error or a success after the second attempt.

Smartphone (please complete the following information):
Device: Pixel Emulator
OS: Android
Version 32.1.14.0

@gunnartorfis gunnartorfis added the bug report when a bug report is created label Feb 8, 2024
@gunnartorfis
Copy link
Contributor Author

This only seems to be an issue on a Debug build. I just built a Release variant and I'm unable to reproduce it there 🤔

@descorp
Copy link
Contributor

descorp commented Feb 12, 2024

Hey @gunnartorfis

Sometimes I see that breakpoints are interfering RN UI thread on Android. Could this be the case?

@descorp descorp added question Further information is requested and removed bug report when a bug report is created labels Feb 12, 2024
@MisterMaroki
Copy link

following.

Experiencing this on Android and iOS, after payment fail, calling component.hide(false,{message}). Observing infinite spinner after 2nd submit. onSubmit only called once for the first try but never called on second try.

Expo 49 "expo": "~49.0.6",

Adyen/react-native 2.0.0-beta-2 "@adyen/react-native": "^2.0.0-beta.2",

@descorp
Copy link
Contributor

descorp commented Mar 6, 2024

Hey @MisterMaroki

Are you using Sessions or Advanced flow ?

I see what could be a problem ..
Could you try to recreate AdyenCheckout(ex. navigate back to cart page)?

@MisterMaroki
Copy link

Hey @MisterMaroki

Are you using Sessions or Advanced flow ?

I see what could be a problem .. Could you try to recreate AdyenCheckout(ex. navigate back to cart page)?

I am using advanced flow, event based. Using the start(‘drop-in’) method

@MisterMaroki
Copy link

I solved it by using expo router to dismount and remount the screen as luckily the payment is made on a simple standalone screen.

it’s a hack solution but if anyone else faces this you’ll have to remount to screen and call the start(‘drop in’) func in a setTimeout with 200ms wait.

Waiting on a real solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants