Unable to bind to service com.stripe.cots.aidlservice.CotsService@d436af9 with Intent(...); java.security.InvalidKeyException: Keystore operation failed #483
We are having some crashes with the stripe sdk integration in our application, more specific we are getting this crash:
Unable to bind to service com.stripe.cots.aidlservice.CotsService@d436af9 with Intent { act= cmp=com.***/com.stripe.cots.aidlservice.CotsService }: java.security.InvalidKeyException: Keystore operation failed
With its two variants, for encrypt and decrypt, emerging from the lines:
Summary
We are having some crashes with the stripe sdk integration in our application, more specific we are getting this crash:
With its two variants, for encrypt and decrypt, emerging from the lines:
Code to reproduce
We couldn't reproduce it on our ends, we are seeing the crashes in crashlytics dashbord.
Android version
For the moment we are seeing this only on Android 14 devices.
Impacted devices (Android devices or readers)
We are seeing this coming from the models Samsung S24 and S24 Ultra. Also our users are using tap to pay and M2 readers
SDK version
We are using the libraries: implementation "com.stripe:stripeterminal-localmobile:3.8.0" implementation "com.stripe:stripeterminal-core:3.8.0"
Other information
Full logs:
android.security.keystore2.KeyStoreCryptoOperationUtils.getInvalidKeyException (KeyStoreCryptoOperationUtils.java:128) android.security.keystore2.KeyStoreCryptoOperationUtils.getExceptionForCipherInit (KeyStoreCryptoOperationUtils.java:152) android.security.keystore2.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized (AndroidKeyStoreCipherSpiBase.java:360) android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineInit (AndroidKeyStoreCipherSpiBase.java:191) javax.crypto.Cipher.tryTransformWithProvider (Cipher.java:2985) javax.crypto.Cipher.tryCombinations (Cipher.java:2892) javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider (Cipher.java:2797) javax.crypto.Cipher.chooseProvider (Cipher.java:774) javax.crypto.Cipher.init (Cipher.java:1144) javax.crypto.Cipher.init (Cipher.java:1085) com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encryptInternal (AndroidKeystoreAesGcm.java:85) com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt (AndroidKeystoreAesGcm.java:73) com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead (AndroidKeystoreKmsClient.java:298) com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead (AndroidKeystoreKmsClient.java:180) com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readMasterkeyDecryptAndParseKeyset (AndroidKeysetManager.java:365) com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build (AndroidKeysetManager.java:297) java.lang.reflect.Method.invoke (Method.java) com.s.y.BuildL20598.As (Unknown Source:152) com.s.y.BuildL20598.Dashboard (Unknown Source:120) com.s.u.initiateY19369.Billing (Unknown Source:183) com.s.u.initiateY19369.<init> (Unknown Source:108) com.s.af.comesJ22809.Billing (Unknown Source:17) com.s.af.choiceH28330.Dashboard (Unknown Source:42) com.s.af.choiceH28330.Connect (Unknown Source:34) com.s.af.choiceH28330.get (Unknown Source:11) dagger.internal.DoubleCheck.get (DoubleCheck.java:47) com.s.af.deploymentI20231.Dashboard (Unknown Source:39) com.s.af.deploymentI20231.get (Unknown Source:12) dagger.internal.DoubleCheck.get (DoubleCheck.java:47) com.s.u.andT28668.Dashboard (Unknown Source:101) com.s.u.andT28668.get (Unknown Source:19) dagger.internal.DoubleCheck.get (DoubleCheck.java:47) com.s.af.DashboardV16708.Dashboard (Unknown Source:61) com.s.af.DashboardV16708.get (Unknown Source:17) com.s.s.BuildR26798.Dashboard (Unknown Source:42) com.s.s.BuildR26798.get (Unknown Source:14) dagger.internal.DoubleCheck.get (DoubleCheck.java:47) com.s.s.BillingG22511.Build (Unknown Source:37) com.s.s.BillingG22511.get (Unknown Source:13) dagger.internal.DoubleCheck.get (DoubleCheck.java:47) com.s.s.ConnectW16626.Billing (Unknown Source:42) com.s.s.ConnectW16626.get (Unknown Source:14) dagger.internal.DoubleCheck.get (DoubleCheck.java:47) com.s.u.experienceP17930$BuildX25728.Billing (Unknown Source:719) com.stripe.cots.aidlservice.CotsService$AsF16.invokeSuspend (Unknown Source:96) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104) kotlinx.coroutines.internal.LimitedDispatcher$Worker.run (LimitedDispatcher.kt:111) kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:99) kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:811) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:715) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt)