1

Crashlytics report for my android app shows that a considerable number of my users are getting the following null pointer exception. Most of my users who get this error are on Android 6. It happens only when the build is obfuscated.

The crash is caused by a call to,

org.stellar.sdk.Server(String uri)

How do I fix this? Any help would be appreciated.

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 
 'java.util.Enumeration java.security.KeyStore.aliases()' on a null object reference
 at com.android.org.conscrypt.TrustManagerImpl.acceptedIssuers(TrustManagerImpl.java:185)
 at com.android.org.conscrypt.TrustManagerImpl.getAcceptedIssuers(TrustManagerImpl.java:603)
 at shadow.okhttp3.internal.platform.Platform.buildTrustRootIndex(Platform.java)
 at shadow.okhttp3.internal.platform.Platform.afterHandshake(Platform.java)
 at shadow.okhttp3.internal.tls.CertificateChainCleaner.get(CertificateChainCleaner.java:8)
 at shadow.okhttp3.OkHttpClient.<init>(OkHttpClient.java:8)
 at shadow.okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:7)
 at org.stellar.sdk.Server.<init>(Server.java:7)
 at com.myapp.MyStellarManager.<clinit>(MyStellarManager.java)
 at com.myapp.MainVM$observableData$1.invokeSuspend(MainVM.java:2)
 at kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(Intrinsics.java)
 at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:2)
 at kotlinx.coroutines.scheduling.CoroutineScheduler.access$getCorePoolSize$p(CoroutineScheduler.java)
 at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.java:18)
 at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:18)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.