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

[BUG] PhoneNumberController - java.lang.IndexOutOfBoundsException #9550

Open
lpisk opened this issue Nov 4, 2024 · 2 comments
Open

[BUG] PhoneNumberController - java.lang.IndexOutOfBoundsException #9550

lpisk opened this issue Nov 4, 2024 · 2 comments
Labels

Comments

@lpisk
Copy link

lpisk commented Nov 4, 2024

Summary

Crash on some devices when PaymentSheet is opened.

Android version

Android 8,
Android 9,
Android 10,
Android 11,
Android 12,
Android 13

Impacted devices

Huawei,
Samsung,
Xiaomi,
Lenovo Mobile

Installation method

Gradle dependency

Dependency Versions

Stripe Android SDK: 20.52.1

kotlin:
stripe-android: 20.52.1
Android Gradle Plugin: 2.0.20
Gradle: 8.6

SDK classes

PaymentSheetScreenKt

Other information

Fatal Exception: java.lang.IndexOutOfBoundsException
Index: 0, Size: 0

com.stripe.android.uicore.elements.PhoneNumberController$phoneNumberMinimumLength$1.invoke (PhoneNumberController.java:67)
com.stripe.android.uicore.elements.PhoneNumberController$phoneNumberMinimumLength$1.invoke (PhoneNumberController.java:65)
com.stripe.android.uicore.utils.StateFlowsKt$mapAsStateFlow$2.invoke (StateFlows.kt:68)
com.stripe.android.uicore.utils.FlowToStateFlow.getValue (StateFlows.kt:39)
com.stripe.android.uicore.utils.StateFlowsKt$combineAsStateFlow$2.invoke (StateFlows.kt:101)
com.stripe.android.uicore.utils.FlowToStateFlow.getValue (StateFlows.kt:39)
com.stripe.android.uicore.utils.StateFlowsKt$combineAsStateFlow$4.invoke (StateFlows.kt:118)
com.stripe.android.uicore.utils.FlowToStateFlow.getValue (StateFlows.kt:39)
com.stripe.android.uicore.elements.SectionController$special$$inlined$combineAsStateFlow$2.invoke (SectionController.java:211)
com.stripe.android.uicore.utils.FlowToStateFlow.getValue (StateFlows.kt:39)
com.stripe.android.uicore.utils.StateFlowsComposeKt$collectAsState$1$1.invoke (StateFlowsCompose.kt:44)
com.stripe.android.uicore.utils.StateFlowsComposeKt.produceState (StateFlowsCompose.kt:34)
com.stripe.android.uicore.utils.StateFlowsComposeKt.collectAsState (StateFlowsCompose.kt:43)
com.stripe.android.link.ui.inline.LinkOptionalInlineSignupKt.LinkOptionalInlineSignup (LinkOptionalInlineSignup.kt:116)
com.stripe.android.link.ui.inline.LinkOptionalInlineSignupKt.LinkOptionalInlineSignup (LinkOptionalInlineSignup.kt:81)
com.stripe.android.link.ui.inline.LinkElementKt.LinkElement (LinkElement.kt:54)
com.stripe.android.lpmfoundations.paymentmethod.link.LinkFormElement.ComposeUI (LinkFormElement.kt:27)
com.stripe.android.ui.core.FormUIKt.FormUIElement (FormUI.kt:121)
com.stripe.android.ui.core.FormUIKt.FormUI (FormUI.kt:75)
com.stripe.android.paymentsheet.ui.PaymentMethodFormKt.PaymentMethodForm (PaymentMethodForm.kt:69)
com.stripe.android.paymentsheet.ui.PaymentMethodFormKt.PaymentMethodForm (PaymentMethodForm.kt:40)
com.stripe.android.paymentsheet.ui.PaymentElementKt.FormElement-PfoAEA0 (PaymentElement.kt:129)
com.stripe.android.paymentsheet.ui.PaymentElementKt.PaymentElement (PaymentElement.kt:75)
com.stripe.android.paymentsheet.ui.AddPaymentMethodKt.AddPaymentMethod (AddPaymentMethod.kt:27)
com.stripe.android.paymentsheet.navigation.PaymentSheetScreen$AddFirstPaymentMethod.Content (PaymentSheetScreen.kt:279)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt$PaymentSheetContent$3$3$1.invoke (PaymentSheetScreen.kt:315)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt$PaymentSheetContent$3$3$1.invoke (PaymentSheetScreen.kt:314)
androidx.compose.runtime.internal.ComposableLambdaImpl.invoke (ComposableLambda.jvm.kt:109)

androidx.compose.runtime.internal.ComposableLambdaImpl.invoke (ComposableLambda.jvm.kt:35)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt$EventReporterProvider$3.invoke (PaymentSheetScreen.kt:419)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt$EventReporterProvider$3.invoke (PaymentSheetScreen.kt:418)
androidx.compose.runtime.internal.ComposableLambdaImpl.invoke (ComposableLambda.jvm.kt:109)

androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider (CompositionLocal.kt:380)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt.EventReporterProvider (PaymentSheetScreen.kt:415)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt.PaymentSheetContent (PaymentSheetScreen.kt:314)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt.PaymentSheetContent$Content (PaymentSheetScreen.kt:254)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt.PaymentSheetContent (PaymentSheetScreen.kt:272)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt.PaymentSheetScreenContent (PaymentSheetScreen.kt:196)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt$PaymentSheetScreenContent$2.invoke (PaymentSheetScreen.kt:147)
com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt$PaymentSheetScreenContent$2.invoke (PaymentSheetScreen.kt:75)
androidx.compose.runtime.RecomposeScopeImpl.compose (RecomposeScopeImpl.java:192)

com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)

@lpisk lpisk added the bug label Nov 4, 2024
@samer-stripe
Copy link
Collaborator

Hey @lpisk! I wasn't able to re-produce this on the Android device types you listed. Could you name the specific device and Android version this bug was occurring on?

@lpisk
Copy link
Author

lpisk commented Nov 11, 2024

@samer-stripe
Our issue is mentioned here:
#8971 (comment)
Developers know about it.

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

No branches or pull requests

2 participants