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

Crash: CardForm android app crash on clicking keyboard next button

Open Jamal-ReachFirst opened this issue 2 years ago • 1 comments

Describe the bug After clicking keyboard next button on CardForm CVC input android app is crashing on both emulator and real device for those countries which don't have zipcode input. It works fine for those countries which have zip code input.

To Reproduce On CVC input click the keyboard next button the app will crash for those countries which don't have zipcode input.

Expected behavior No crashes

Smartphone: Crash on all android devices (including emulators)

I'm using:

"@stripe/stripe-react-native": "^0.23.0"
import { CardForm } from "@stripe/stripe-react-native";

Crash:

java.lang.IllegalStateException: focus search returned a view that wasn't able to take focus!
at android.widget.TextView.onEditorAction(TextView.java:7420)
at com.android.internal.inputmethod.EditableInputConnection.performEditorAction(EditableInputConnection.java:156)
at android.view.inputmethod.InputConnectionWrapper.performEditorAction(InputConnectionWrapper.java:246)
at android.view.inputmethod.InputConnectionWrapper.performEditorAction(InputConnectionWrapper.java:246)
at com.android.internal.inputmethod.RemoteInputConnectionImpl.lambda$performEditorAction$21$com-android-internal-inputmethod-RemoteInputConnectionImpl(RemoteInputConnectionImpl.java:654)
 at com.android.internal.inputmethod.RemoteInputConnectionImpl$$ExternalSyntheticLambda33.run(Unknown Source:6)
 at android.os.Handler.handleCallback(Handler.java:942)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loopOnce(Looper.java:201)
 at android.os.Looper.loop(Looper.java:288)
 at android.app.ActivityThread.main(ActivityThread.java:7872)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Jamal-ReachFirst avatar Aug 18 '23 11:08 Jamal-ReachFirst

temporary fix would be to remove defaultValues prop in CardForm component

neilnahid avatar Oct 12 '23 14:10 neilnahid