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

Crash com.stripe.cots.activity.BillingN20167.Build #533

Open
piotrekBDS opened this issue Nov 27, 2024 · 6 comments
Open

Crash com.stripe.cots.activity.BillingN20167.Build #533

piotrekBDS opened this issue Nov 27, 2024 · 6 comments

Comments

@piotrekBDS
Copy link

piotrekBDS commented Nov 27, 2024

Summary

Random crash occured 2-3 times during creating Tap to Pay transaction. Unable to reproduce on demand. 99% TTP transactions work smoothly.

Code to reproduce

Unable to reproduce

Android version

Android 11

Impacted devices (Android devices or readers)

Samsung Galaxy s20+
Samsung Galaxy S21

SDK version

com.stripe:stripeterminal-taptopay:4.0.0
com.stripe:stripeterminal-core:4.0.0

Other information

Stacktrace (Crashlytics):

Fatal Exception: java.lang.StringIndexOutOfBoundsException
length=5; index=7

java.lang.String.substring (String.java:2060)
com.stripe.cots.activity.BillingN20167.Build (Unknown Source:465)
com.stripe.cots.activity.BillingN20167.As (Unknown Source:417)
com.stripe.cots.activity.BillingN20167.Connect (Unknown Source:494)
java.lang.reflect.Method.invoke (Method.java)
com.stripe.cots.activity.ContactlessPaymentFragment.onCreateView (Unknown Source:114)
androidx.fragment.app.Fragment.performCreateView (Fragment.java:3119)
androidx.fragment.app.FragmentStateManager.createView (FragmentStateManager.java:577)
androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:286)
androidx.fragment.app.FragmentStore.moveToExpectedState (FragmentStore.java:114)
androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1675)
androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:3269)
androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:3187)
androidx.fragment.app.FragmentController.dispatchActivityCreated (FragmentController.java:263)
androidx.fragment.app.FragmentActivity.onStart (FragmentActivity.java:350)
androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:251)
com.stripe.cots.activity.ContactlessPaymentActivity.onStart (Unknown Source:65354)
android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1435)
android.app.Activity.performStart (Activity.java:8195)
android.app.ActivityThread.handleStartActivity (ActivityThread.java:3789)
android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:221)
android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:201)
android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:173)
android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2278)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:246)
android.app.ActivityThread.main (ActivityThread.java:8429)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:596)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
@piotrekBDS
Copy link
Author

Happening again for Samsung Galaxy S21 5G , Android 11

@chr-stripe
Copy link
Collaborator

Hi @piotrekBDS, can you try updating to SDK 4.1.0? We believe the issue you're running into is fixed in that version.

@piotrekBDS
Copy link
Author

Well, the 4.1.0 version changed the whole card payment sheet we are using in other place and I cannot do that as for now. Is there any way (version) to use "old" card payment sheet and have the t2p issue fixed?

@chr-stripe
Copy link
Collaborator

Can you elaborate on which changes you're referring to? I don't believe there have been any updates to the visuals of the Tap to Pay payment screen in 4.1.0.

@piotrekBDS
Copy link
Author

@chr-stripe thank you, sorry for the confusion, seems like we had wrong SDKs setup there.
We are about to test 4.1.0. I will let you know/close the task if things are alright. Thanks!

@piotrekBDS
Copy link
Author

piotrekBDS commented Dec 13, 2024

@chr-stripe after upgrade to 4.1.0 and another round of tests we are observing same exception being thrown, in different place though (code below). Shall we create separate issue for this?

Fatal Exception: java.lang.StringIndexOutOfBoundsException: length=5; index=7 at java.lang.String.substring(String.java:2060) at com.stripe.cots.activity.StripeP16798.As(:491) at com.stripe.cots.activity.StripeP16798.As(:443) at com.stripe.cots.activity.StripeP16798.Connect(:523) at com.stripe.cots.activity.StripeP16798.Billing(:1) at com.stripe.cots.activity.StripeP16798.Dashboard(:65354) at java.lang.reflect.Method.invoke(Method.java) at com.stripe.cots.activity.ContactlessPaymentFragment.onCreateView(:115) at androidx.fragment.app.Fragment.performCreateView(Fragment.java:3119) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:577) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:286) at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:114) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1685) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3319) at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3237) at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:263) at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:350) at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:251) at com.stripe.cots.activity.ContactlessPaymentActivity.onStart(:65354) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435) at android.app.Activity.performStart(Activity.java:8222) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3818) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:246) at android.app.ActivityThread.main(ActivityThread.java:8512) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

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

No branches or pull requests

2 participants