-
Notifications
You must be signed in to change notification settings - Fork 51
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 on Release Build v4.0.0 && v.4.1.0 java.lang.NoSuchMethodError: No static method startTimedMetric
#527
Comments
Hi @jayjah According to our documentation, you should replace
Can you try removing the line Also, since this is only occurring in release builds, it seems like there might be a minification issue too. Can you provide any further details on your release build setup? Are you using proguard/dexguard? If the above fix doesn't work, try adding the following to your proguard config:
|
Hi @sidhant-stripe, thank you for your response! Unfortunately it's not possible for us to remove Furthermore our proguard config already includes those lines. Just for clarification: |
hi @jayjah, I've checked internally and confirmed that you do not need to include the A serial number for the device, account ID and approximate date/time when you encountered this issue would also be helpful if you can provide them. |
@sidhant-stripe Unfortunately the same error occurs when I remove Sure, here are all information you asked for: Device ID: 89033023427100000000027390897104 I'll provide the account ID as soon as I got it from my co-worker. |
@sidhant-stripe Unfortunately the same error happened with version 4.1.0 and Current stripe dependencies looks like the following:
|
java.lang.NoSuchMethodError: No static method startTimedMetric
java.lang.NoSuchMethodError: No static method startTimedMetric
@sidhant-stripe I received the same error. My application's minimum SDK was 23. Updating it to 26 resolved the issue, and tap-to-pay now works as expected. Could you please help us understand if setting the minimum SDK to 26 is a mandatory requirement? According to the documentation, the SDK relies on Java 8 methods and requires SDK 26. Enabling desugaring while setting the minimum SDK to 23 throws a different error. Process: dev.ranjith.qa:stripetaptopay, PID: 4730
java.lang.NoSuchMethodError: No static method getOrNull(Ljava/util/Optional;)Ljava/lang/Object; in class Lkotlin/jvm/optionals/OptionalsKt; or its super classes (declaration of 'kotlin.jvm.optionals.OptionalsKt' appears in /data/app/~~gedYiDtwJ7J60ouTvksvQQ==/dev.ranjith.qa-AOLfgmfdCnBpagxUrHGHcw==/base.apk!classes8.dex)
at com.stripe.cots.pin.andQ31597.Connect(:75)
at com.stripe.cots.pin.andQ31597.As(:32)
at com.stripe.cots.pin.andQ31597.As(:1)
at com.stripe.cots.pin.andQ31597.Build(:65354)
at java.lang.reflect.Method.invoke(Native Method)
at com.stripe.cots.pin.skb.SecureKeyBoxWrapper.<init>(SourceFile:144)
at com.s.af.builtN30636.As(:28)
at com.s.af.builtN30636.Billing(:1)
at com.s.af.builtN30636.Build(:65353)
at com.s.af.buildingJ25130.Connect(:52)
at com.s.af.buildingJ25130.Dashboard(:1)
at com.s.af.buildingJ25130.Dashboard(:65353)
at com.s.af.buildingJ25130.Dashboard(:41)
at com.s.af.buildingJ25130.get(:13)
at dagger.internal.DoubleCheck.getSynchronized(SourceFile:10)
at dagger.internal.DoubleCheck.get(SourceFile:7)
at com.s.af.canG6061.Billing(:52)
at com.s.af.canG6061.get(:16)
at dagger.internal.DoubleCheck.getSynchronized(SourceFile:10)
at dagger.internal.DoubleCheck.get(SourceFile:7)
at com.s.af.BillingS1543.Connect(:62)
at com.s.af.BillingS1543.get(:17)
at com.s.r.BillingN6887.Dashboard(:43)
at com.s.r.BillingN6887.get(:14)
at dagger.internal.DoubleCheck.getSynchronized(SourceFile:10)
at dagger.internal.DoubleCheck.get(SourceFile:7)
at com.s.r.BuildR23607.Connect(:38)
at com.s.r.BuildR23607.get(:13)
at dagger.internal.DoubleCheck.getSynchronized(SourceFile:10)
at dagger.internal.DoubleCheck.get(SourceFile:7)
at com.s.r.DashboardG30757.Connect(:43)
at com.s.r.DashboardG30757.get(:14)
at dagger.internal.DoubleCheck.getSynchronized(SourceFile:10)
at dagger.internal.DoubleCheck.get(SourceFile:7)
at com.s.u.evenO7538$BuildH11975.Build(:731)
at com.stripe.cots.aidlservice.CotsService$AsG11088.invokeSuspend(:96)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:12)
at kotlinx.coroutines.DispatchedTask.run(SourceFile:126)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(SourceFile:4)
at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:3)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(SourceFile:1)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(SourceFile:34)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(SourceFile:29)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:1) Is stripe terminal SDK compatible with desugaring? |
Hi all, The Terminal SDK is only compatible with apps supporting Android API level 26 and above. Note that the Terminal SDK will fail to initialize on devices less than API 26 due to internal runtime API level validation, so specifying a minSdk less than 26 is not supported. On top of that, Tap to Pay integrations have an additional runtime requirement which requires that the device runs Android 11 (API level 30) or higher. To my knowledge, the Terminal SDK doesn't necessarily need Java 8. It's just mentioned that it's compatible with Java 8 (and desugaring, if necessary) if your integration uses it. |
Hi @chr-stripe versions before 4.0.0 were fine to compile with Android API level below 26. We made runtime checks to make sure that the SDK will at first initialize only on valid API levels and run only on that specific valid API levels. Why was this behaviour changed with Version 4.0.0? This makes it currently absolute not usable at all for us. |
Summary
A crash is happening during a payment process only in release builds. This happens when TapToPay with v.4.0.0 is chosen.
Following stacktrace is visible:
Code to reproduce
Android version
Android 14
Impacted devices
Google Pixel 7a
Dependency Versions
The text was updated successfully, but these errors were encountered: