tangem / tangem-sdk-android

The native Kotlin library for Android and JVM platforms (Windows, Linux, macOS)
https://tangem.com
MIT License
62 stars 36 forks source link

Error scanning card in release mode #327

Closed MarvinQuevedo closed 11 months ago

MarvinQuevedo commented 11 months ago

Hi, I am working in a implementation for user your card in our Wallet, Ozone Wallet, I just finished my implementation, in debug mode work in iOS and Android, but in release only work with Android, for android I receive the error below, I understhan is related with the security providers, but I can't solve, You you can help me?

FATAL EXCEPTION: DefaultDispatcher-worker-2 Process: com.chiatk.apps.ozone1, PID: 30272 java.security.NoSuchAlgorithmException: no such algorithm: SHA256withECDSA for provider SC at sun.security.jca.GetInstance.getService(GetInstance.java:87) at sun.security.jca.GetInstance.getInstance(GetInstance.java:206) at java.security.Signature.getInstance(Signature.java:504) at aa.i.p(Unknown Source:19) at aa.a.j(Unknown Source:59) at aa.a.k(Unknown Source:6) at com.tangem.operations.attestation.AttestCardKeyResponse.e(Unknown Source:22) at ga.a$a.a(Unknown Source:19) at ga.a$a.invoke(Unknown Source:2) at fa.b$f.a(Unknown Source:207) at fa.b$f.invoke(Unknown Source:2) at fa.b$c.a(Unknown Source:237) at fa.b$c.invoke(Unknown Source:2) at r9.b$r$d.emit(Unknown Source:15) at kotlinx.coroutines.flow.j$c.emit(Unknown Source:64) at r9.b$r$h$a.emit(Unknown Source:66) at r9.b$r$g$a.emit(Unknown Source:94) at r9.b$r$f$a.emit(Unknown Source:88) at r9.b$r$e$a.emit(Unknown Source:90) at kotlinx.coroutines.flow.l$a$a.emit(Unknown Source:58) at kotlinx.coroutines.flow.g.e(Unknown Source:145) at kotlinx.coroutines.flow.g.a(Unknown Source:0) at kotlinx.coroutines.flow.b.a(Unknown Source:12) at kotlinx.coroutines.flow.l$a.a(Unknown Source:7) at r9.b$r$e.a(Unknown Source:7) at r9.b$r$f.a(Unknown Source:7) at r9.b$r$g.a(Unknown Source:7) at r9.b$r$h.a(Unknown Source:7) at kotlinx.coroutines.flow.j.b(Unknown Source:72) at kotlinx.coroutines.flow.e.c(Unknown Source:0) at kotlinx.coroutines.flow.j$a.a(Unknown Source:75) at r9.b$r.invokeSuspend(Unknown Source:89) at kotlin.coroutines.jvm.internal.a.resumeWith(Unknown Source:11) at tf.s0.run(Unknown Source:88) at kotlinx.coroutines.internal.k.run(Unknown Source:12) at kotlinx.coroutines.scheduling.k.run(Unknown Source:2) at kotlinx.coroutines.scheduling.a.q(Unknown Source:0) at kotlinx.coroutines.scheduling.a$c.d(Unknown Source:14) at kotlinx.coroutines.scheduling.a$c.n(Unknown Source:28) at kotlinx.coroutines.scheduling.a$c.run(Unknown Source:0) Suppressed: tf.q0: [r9.b$t@3a46388, h2{Cancelling}@6820121, Dispatchers.IO]

https://github.com/tangem/tangem-sdk-flutter/issues/19

kozarezvlad commented 11 months ago

Have you added proguard rules for spongycastle?

Try to add this: -keep class org.spongycastle.** -dontwarn org.spongycastle.jce.provider.X509LDAPCertStoreSpi -dontwarn org.spongycastle.x509.util.LDAPStoreHelper

MarvinQuevedo commented 11 months ago

Uff! excellect!, thanks for the fast help!

MarvinQuevedo commented 11 months ago

I tried and all work ok now, Thank you very much!