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

SDK Crash #530

Open
CoderzHeaven opened this issue Nov 20, 2024 · 4 comments
Open

SDK Crash #530

CoderzHeaven opened this issue Nov 20, 2024 · 4 comments

Comments

@CoderzHeaven
Copy link

Summary

Crash after Terminal Initialization and discovering readers, Ultimately discovery is getting timeout even after finding readers.
Then app will crash in few seconds.

Code to reproduce

Simply initialize the terminal and wait to discover the readers

Android version

all versions above 8.1

Impacted devices (Android devices or readers)

STRM26142076758

SDK version

implementation 'com.stripe:stripe-android:21.0.1'
implementation "com.stripe:stripeterminal:4.0.0"
implementation "com.stripe:stripeterminal-localmobile:3.10.0"
implementation "com.stripe:stripeterminal-core:4.0.0"

Other information

Crash Logs

Corrupt proto payload in the queue: terminal_sdk_wire_metrics
java.io.EOFException
at com.squareup.wire.ProtoReader.internalNextLengthDelimited(ProtoReader.kt:152)
at com.squareup.wire.ProtoReader.nextTag(ProtoReader.kt:184)
at com.stripe.proto.api.gator.EventResultPb$Companion$ADAPTER$1.decode(EventResultPb.kt:421)
at com.stripe.proto.api.gator.EventResultPb$Companion$ADAPTER$1.decode(EventResultPb.kt:286)
at com.stripe.proto.api.gator.ProxyEventPb$Companion$ADAPTER$1.decode(ProxyEventPb.kt:210)
at com.stripe.proto.api.gator.ProxyEventPb$Companion$ADAPTER$1.decode(ProxyEventPb.kt:164)
at com.squareup.wire.ProtoAdapter.decode(ProtoAdapter.kt:457)
at com.squareup.wire.ProtoAdapter.decode(ProtoAdapter.kt:455)
at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileProtoSerializer.fromBytes(QueueFileProtoSerializer.kt:27)
at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileProtoSerializer.fromBytes(QueueFileProtoSerializer.kt:11)
at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileCollector.populateBatch(QueueFileCollector.kt:245)
at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileCollector.access$populateBatch(QueueFileCollector.kt:26)
at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileCollector$peek$2.invokeSuspend(QueueFileCollector.kt:180)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
terminal_sdk_wire_events batch of size 12 generated.
terminal_sdk_wire_traces_2 batch of size 32 generated.
Background concurrent copying GC freed 11MB AllocSpace bytes, 158(7964KB) LOS objects, 49% free, 18MB/37MB, paused 785us,73us total 108.951ms
Input channel destroyed: 'ClientS', fd=199
FATAL EXCEPTION: main

java.lang.NegativeArraySizeException: -1592786944
at com.squareup.tape2.QueueFile$ElementIterator.next(QueueFile.java:549)
at com.squareup.tape2.QueueFile$ElementIterator.next(QueueFile.java:514)
at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileCollector.populateBatch(QueueFileCollector.kt:425)
at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileCollector.access$populateBatch(QueueFileCollector.kt:26)
at com.stripe.jvmcore.batchdispatcher.collectors.QueueFileCollector$peek$2.invokeSuspend(QueueFileCollector.kt:180)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineName(AppScope), StandaloneCoroutine{Cancelling}@a60cbbe, Dispatchers.Main.immediate]
Sending signal. PID: 13758 SIG: 9

Also the reader is not connecting the the app after it is sitting connected overnight. Its not even proceeding to initialize the Terminal.

@sjl-stripe
Copy link
Collaborator

@CoderzHeaven It seems like your tap to pay dependency is out of date.

Can you try replacing this line:

implementation "com.stripe:stripeterminal-localmobile:3.10.0"

with this line:

implementation "com.stripe:stripeterminal-taptopay:4.0.0"

@CoderzHeaven
Copy link
Author

CoderzHeaven commented Nov 22, 2024

I am not even using this library. anyway I updated and ran the app.
Now the app crashes instantly on Terminal.initialize

These are the updated dependencies:
implementation 'com.stripe:stripe-android:21.2.0'
implementation "com.stripe:stripeterminal:4.1.0"
implementation "com.stripe:stripeterminal-core:4.1.0"

Below is the error log
class=TerminalSdkManager
java.lang.ExceptionInInitializerError
at io.ktor.serialization.kotlinx.ExtensionsKt.extensions(Extensions.kt:17)
at io.ktor.serialization.kotlinx.KotlinxSerializationConverter.(KotlinxSerializationConverter.kt:28)
at io.ktor.serialization.kotlinx.KotlinxSerializationConverterKt.serialization(KotlinxSerializationConverter.kt:131)
at io.ktor.serialization.kotlinx.json.JsonSupportKt.json(JsonSupport.kt:57)
at io.ktor.serialization.kotlinx.json.JsonSupportKt.json$default(JsonSupport.kt:53)
at com.stripe.spos.sentry.http.SentryHttpClient$httpClient$1$2.invoke(SentryHttpClient.kt:45)
at com.stripe.spos.sentry.http.SentryHttpClient$httpClient$1$2.invoke(SentryHttpClient.kt:44)
at io.ktor.client.HttpClientConfig$install$2.invoke(HttpClientConfig.kt:76)
at io.ktor.client.HttpClientConfig$install$2.invoke(HttpClientConfig.kt:72)
at io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin.prepare(ContentNegotiation.kt:247)
at io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin.prepare(ContentNegotiation.kt:242)
at io.ktor.client.HttpClientConfig$install$3.invoke(HttpClientConfig.kt:84)
at io.ktor.client.HttpClientConfig$install$3.invoke(HttpClientConfig.kt:81)
at io.ktor.client.HttpClientConfig.install(HttpClientConfig.kt:104)
at io.ktor.client.HttpClient.(HttpClient.kt:172)
at io.ktor.client.HttpClient.(HttpClient.kt:84)
at io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:63)
at com.stripe.spos.sentry.http.SentryHttpClient.(SentryHttpClient.kt:40)
at com.stripe.spos.sentry.http.SentryHttpClient.(SentryHttpClient.kt:34)
at com.stripe.spos.sentry.http.SentryHttpClient.(SentryHttpClient.kt:63)
at com.stripe.stripeterminal.internal.common.log.SentryAndroidKt.createSentryAndroid(SentryAndroid.kt:33)
at com.stripe.stripeterminal.internal.common.log.SentryAndroidKt.createSentryAndroid$default(SentryAndroid.kt:16)
at com.stripe.stripeterminal.dagger.TerminalModule.sentry(TerminalModule.kt:127)
at com.stripe.stripeterminal.dagger.TerminalModule_SentryFactory.sentry(TerminalModule_SentryFactory.java:49)
at com.stripe.stripeterminal.dagger.TerminalModule_SentryFactory.get(TerminalModule_SentryFactory.java:40)
at com.stripe.stripeterminal.dagger.TerminalModule_SentryFactory.get(TerminalModule_SentryFactory.java:13)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at com.stripe.stripeterminal.dagger.TerminalModule_ProvideTerminalSessionFactory.get(TerminalModule_ProvideTerminalSessionFactory.java:268)
at com.stripe.stripeterminal.dagger.TerminalModule_ProvideTerminalSessionFactory.get(TerminalModule_ProvideTerminalSessionFactory.java:61)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at dagger.internal.DelegateFactory.get(DelegateFactory.java:35)
at com.stripe.stripeterminal.DaggerTerminalComponent$TerminalComponentImpl.getTerminalSession(DaggerTerminalComponent.java:2284)
at com.stripe.stripeterminal.TerminalSdkManager.initTerminalSession(TerminalSdkManager.kt:169)
at com.stripe.stripeterminal.Terminal$Companion.initTerminal(Terminal.kt:825)
at com.stripe.stripeterminal.Terminal$Companion.initTerminal(Terminal.kt:796)
at com.madinaapps.kiosk.stripe.StripePaymentUtils.initStripe(StripePaymentUtils.kt:265)
at com.madinaapps.kiosk.stripe.StripePaymentUtils.initializeStripe(StripePaymentUtils.kt:183)
at com.madinaapps.kiosk.stripe.StripePaymentUtils.checkAndInitializeStripe$lambda$0(StripePaymentUtils.kt:158)
at com.madinaapps.kiosk.stripe.StripePaymentUtils.$r8$lambda$lmJjUNyWYAvbrEBUZ2yO_I8f3qc(Unknown Source:0)
at com.madinaapps.kiosk.stripe.StripePaymentUtils$$ExternalSyntheticLambda2.run(D8$$SyntheticClass:0)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:314)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:268)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:278)
at java.util.jar.JarVerifier.update(JarVerifier.java:233)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:483)
at java.util.jar.JarFile.getInputStream(JarFile.java:549)
at libcore.io.ClassPathURLStreamHandler$ClassPathURLConnection.getInputStream(ClassPathURLStreamHandler.java:168)
at java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1121)
at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1167)
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1184)
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1238)
at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1367)
at kotlin.collections.CollectionsKt___CollectionsKt.toCollection(_Collections.kt:1303)
at kotlin.collections.CollectionsKt___CollectionsKt.toMutableList(_Collections.kt:1336)
at kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1327)
at io.ktor.serialization.kotlinx.ExtensionsJvmKt.(ExtensionsJvm.kt:11)
... 41 more
FATAL EXCEPTION: Thread-12
Process: com.madinaapps.madinaappskiosk, PID: 763
java.lang.ExceptionInInitializerError
at io.ktor.serialization.kotlinx.ExtensionsKt.extensions(Extensions.kt:17)
at io.ktor.serialization.kotlinx.KotlinxSerializationConverter.(KotlinxSerializationConverter.kt:28)
at io.ktor.serialization.kotlinx.KotlinxSerializationConverterKt.serialization(KotlinxSerializationConverter.kt:131)
at io.ktor.serialization.kotlinx.json.JsonSupportKt.json(JsonSupport.kt:57)
at io.ktor.serialization.kotlinx.json.JsonSupportKt.json$default(JsonSupport.kt:53)
at com.stripe.spos.sentry.http.SentryHttpClient$httpClient$1$2.invoke(SentryHttpClient.kt:45)
at com.stripe.spos.sentry.http.SentryHttpClient$httpClient$1$2.invoke(SentryHttpClient.kt:44)
at io.ktor.client.HttpClientConfig$install$2.invoke(HttpClientConfig.kt:76)
at io.ktor.client.HttpClientConfig$install$2.invoke(HttpClientConfig.kt:72)
at io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin.prepare(ContentNegotiation.kt:247)
at io.ktor.client.plugins.contentnegotiation.ContentNegotiation$Plugin.prepare(ContentNegotiation.kt:242)
at io.ktor.client.HttpClientConfig$install$3.invoke(HttpClientConfig.kt:84)
at io.ktor.client.HttpClientConfig$install$3.invoke(HttpClientConfig.kt:81)
at io.ktor.client.HttpClientConfig.install(HttpClientConfig.kt:104)
at io.ktor.client.HttpClient.(HttpClient.kt:172)
at io.ktor.client.HttpClient.(HttpClient.kt:84)
at io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:63)
at com.stripe.spos.sentry.http.SentryHttpClient.(SentryHttpClient.kt:40)
at com.stripe.spos.sentry.http.SentryHttpClient.(SentryHttpClient.kt:34)
at com.stripe.spos.sentry.http.SentryHttpClient.(SentryHttpClient.kt:63)
at com.stripe.stripeterminal.internal.common.log.SentryAndroidKt.createSentryAndroid(SentryAndroid.kt:33)
at com.stripe.stripeterminal.internal.common.log.SentryAndroidKt.createSentryAndroid$default(SentryAndroid.kt:16)
at com.stripe.stripeterminal.dagger.TerminalModule.sentry(TerminalModule.kt:127)
at com.stripe.stripeterminal.dagger.TerminalModule_SentryFactory.sentry(TerminalModule_SentryFactory.java:49)
at com.stripe.stripeterminal.dagger.TerminalModule_SentryFactory.get(TerminalModule_SentryFactory.java:40)
at com.stripe.stripeterminal.dagger.TerminalModule_SentryFactory.get(TerminalModule_SentryFactory.java:13)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at com.stripe.stripeterminal.dagger.TerminalModule_ProvideTerminalSessionFactory.get(TerminalModule_ProvideTerminalSessionFactory.java:268)
at com.stripe.stripeterminal.dagger.TerminalModule_ProvideTerminalSessionFactory.get(TerminalModule_ProvideTerminalSessionFactory.java:61)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at dagger.internal.DelegateFactory.get(DelegateFactory.java:35)
at com.stripe.stripeterminal.DaggerTerminalComponent$TerminalComponentImpl.getTerminalSession(DaggerTerminalComponent.java:2284)
at com.stripe.stripeterminal.TerminalSdkManager.initTerminalSession(TerminalSdkManager.kt:169)
at com.stripe.stripeterminal.Terminal$Companion.initTerminal(Terminal.kt:825)
at com.stripe.stripeterminal.Terminal$Companion.initTerminal(Terminal.kt:796)
at com.madinaapps.kiosk.stripe.StripePaymentUtils.initStripe(StripePaymentUtils.kt:265)
at com.madinaapps.kiosk.stripe.StripePaymentUtils.initializeStripe(StripePaymentUtils.kt:183)
at com.madinaapps.kiosk.stripe.StripePaymentUtils.checkAndInitializeStripe$lambda$0(StripePaymentUtils.kt:158)
at com.madinaapps.kiosk.stripe.StripePaymentUtils.$r8$lambda$lmJjUNyWYAvbrEBUZ2yO_I8f3qc(Unknown Source:0)
at com.madinaapps.kiosk.stripe.StripePaymentUtils$$ExternalSyntheticLambda2.run(D8$$SyntheticClass:0)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:314)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:268)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:278)
at java.util.jar.JarVerifier.update(JarVerifier.java:233)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:483)
at java.util.jar.JarFile.getInputStream(JarFile.java:549)
at libcore.io.ClassPathURLStreamHandler$ClassPathURLConnection.getInputStream(ClassPathURLStreamHandler.java:168)
at java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1121)
at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1167)
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1184)
at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1238)
at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1367)
at kotlin.collections.CollectionsKt___CollectionsKt.toCollection(_Collections.kt:1303)
at kotlin.collections.CollectionsKt___CollectionsKt.toMutableList(_Collections.kt:1336)
at kotlin.collections.CollectionsKt___CollectionsKt.toList(_Collections.kt:1327)
at io.ktor.serialization.kotlinx.ExtensionsJvmKt.(ExtensionsJvm.kt:11)
... 41 more

@madinaapps
Copy link

Can some one from Stripe look at this on priority

@madinaapps
Copy link

We at MadinaAPPS are using Multiple Stripe M2 readers at 650+ Locations. All of it uses commercial hardwired Android Tablets version 8.1 and above with M2 readers connected Via USB. These all are unattended in person payments.

We can not afford to have any firmware upgrades during business hours. We are now slowly pushing out builds with com.stripe:stripeterminal:4.1.0

We are seeing crashes. Can you please tell which SDK version is most stable for android 8.1 and above

Our Stripe M2 readers are always connected via USB but looks like that gets disconnected automatically when not in use.

Can we arrange short 1:1 call with your team

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

3 participants