sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
101 stars 29 forks source link

Updating OkHttp to version 4.7.0 causes the SumUp library to crash. #118

Closed MrIndeciso closed 4 years ago

MrIndeciso commented 4 years ago

The stacktrace is the following:

Caused by: java.lang.RuntimeException: Failed to load certificates from KeyStore
        at android.security.net.config.KeyStoreCertificateSource.ensureInitialized(KeyStoreCertificateSource.java:70)
        at android.security.net.config.KeyStoreCertificateSource.getCertificates(KeyStoreCertificateSource.java:46)
        at android.security.net.config.CertificatesEntryRef.getTrustAnchors(CertificatesEntryRef.java:40)
        at android.security.net.config.NetworkSecurityConfig.getTrustAnchors(NetworkSecurityConfig.java:84)
        at android.security.net.config.NetworkSecurityTrustManager.getAcceptedIssuers(NetworkSecurityTrustManager.java:170)
        at android.security.net.config.RootTrustManager.getAcceptedIssuers(RootTrustManager.java:140)
        at e.f0.j.h.e(SourceFile:155)
        at e.f0.j.h.d(SourceFile:152)
        at e.f0.l.c$a.a(SourceFile:42)
        at e.x$a.K(SourceFile:811)
        at com.sumup.merchant.Network.SSLOkHttpClientFactory.get(SourceFile:39)
        at com.sumup.merchant.ToothpickCoreModule$1.get(SourceFile:46)
        at com.sumup.merchant.ToothpickCoreModule$1.get(SourceFile:42)

This happens on two different devices with two different API levels. It seems to work fine with OkHttp 4.6.0

I was able to replicate the problem on the sample application, and you can view the changes I've done here