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

v1.16.x causes Android crash with stripe-react-native CardField component #807

Closed
thanhcuong1990 opened this issue Feb 14, 2025 · 3 comments · Fixed by #815
Closed

v1.16.x causes Android crash with stripe-react-native CardField component #807

thanhcuong1990 opened this issue Feb 14, 2025 · 3 comments · Fixed by #815
Assignees
Labels
🤖 android Android specific 🎯 crash Library triggers a crash of the app repro provided Issue contains reproduction repository/code

Comments

@thanhcuong1990
Copy link

thanhcuong1990 commented Feb 14, 2025

Describe the bug
I've noticed this issue on the latest stripe-react-native version (v0.41.0) and react native 0.74.7 for the CardField component.
When I upgraded react-native-keyboard-controller from 1.15.2 to 1.16.x, my Android app started crashing.

To resolve the issue, I had to downgrade react-native-keyboard-controller back to 1.15.2, which made it work again.

Crash info

ERROR  Your app just crashed. See the error below.
java.lang.IndexOutOfBoundsException: Index 9 out of bounds for length 9
  jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
  jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
  jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)

To Reproduce
The crash occurs when entering the expiration date—specifically, when inputting the year, an out-of-bounds error is triggered.
I think the issue is related to react-native-keyboard-controller commit: 241d157.

  • Device: Android Phone
  • OS: Android 14, 15
  • RN version: 0.74.7
  • RN architecture: old
  • JS engine: Hermes
  • Library version: 1.16.3

Additional context
Related issue in Stripe Android: stripe/stripe-android#9834

@kirillzyusko kirillzyusko added 🤖 android Android specific 🎯 crash Library triggers a crash of the app labels Feb 14, 2025
@kirillzyusko
Copy link
Owner

Responded here: stripe/stripe-android#9834 (comment)

Let's see if it's stripe issue or not 👀

@kirillzyusko kirillzyusko added the repro provided Issue contains reproduction repository/code label Feb 16, 2025
@lucasrose
Copy link

lucasrose commented Feb 19, 2025

Thanks for creating the issues to track this guys. For some context these were the versions I was using

"@stripe/stripe-react-native": "0.41.0",
"react-native": "0.76.7",
"react-native-keyboard-controller": "^1.16.3"

@kirillzyusko
Copy link
Owner

Fix published in 1.16.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Android specific 🎯 crash Library triggers a crash of the app repro provided Issue contains reproduction repository/code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants