wultra / ssl-pinning-android

Android SDK for our dynamic SSL pinning
Apache License 2.0
60 stars 8 forks source link

Crash due to ClassNotFoundExceptionio.getlime.security.powerauth.keychain.KeychainFactory #38

Closed ValeriiMamo closed 4 years ago

ValeriiMamo commented 4 years ago

Device: Pixel 2 API version: 29

Problem I'm facing the following crash:

Caused by: java.lang.ClassNotFoundException: Didn't find class "io.getlime.security.powerauth.keychain.KeychainFactory" on path: DexPathList[[zip file "/data/app/com.mamopay.app.v2-r8qWkXh3b5dXErReNNWmRA==/base.apk"],nativeLibraryDirectories=[/data/app/com.mamopay.app.v2-r8qWkXh3b5dXErReNNWmRA==/lib/arm64, /data/app/com.mamopay.app.v2-r8qWkXh3b5dXErReNNWmRA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)

Crashes when cert store is initialized:

val configuration = CertStoreConfiguration.Builder(
      serviceUrl = URL("BASE_URL_HERE"),
      publicKey = Base64.decode("SHA256_PUBLIC_KEY_HERE", Base64.NO_WRAP)
).build()
CertStore.powerAuthCertStore(configuration = configuration, context = androidContext())

Code shrinking/obfuscation is disabled.

What I tried to resolve this problem Explicitly added a dependency for powerauth:

implementation 'io.getlime.security.powerauth:powerauth-android-sdk:1.0.0'

Would appreciate if you will take a look.

petrdvorak commented 4 years ago

Thank you for the report, @ValeriiMamo - we will have a look. //cc @hvge @TomasKypta

petrdvorak commented 4 years ago

@ValeriiMamo Could you please try to add version 1.4.3 of the PowerAuth SDK?

implementation 'io.getlime.security.powerauth:powerauth-android-sdk:1.4.3'

https://github.com/wultra/powerauth-mobile-sdk/releases

ValeriiMamo commented 4 years ago

@petrdvorak Thanks for your help, I tried - it works now.

petrdvorak commented 4 years ago

@ValeriiMamo Excellent, thank you for the confirmation and I am glad it works. 🚀

Btw I checked your project website - it looks awesome! Let's stay in touch, maybe we could find ways to cooperate. If you are open to it, drop me a quick message at petr@wultra.com. I will be looking forward to hearing from you... 🤓