Closed iprasla closed 6 years ago
Thanks for reporting this issue. Do you have more info in the stack trace? The current one doesn't actually show which exception is getting thrown.
Unfortunately that is all I could get from the crash. This is the crash reported in production and that is all it was posted in the ANRs & crashes in Playstore.
I found more details on the above error:
01-02 15:47:46.587 7261-7301/? E/ERROR: decrypt
java.security.InvalidKeyException: RSA private or public key is null
at com.android.org.conscrypt.OpenSSLCipherRSA.engineInitInternal(OpenSSLCipherRSA.java:205)
at com.android.org.conscrypt.OpenSSLCipherRSA.engineInit(OpenSSLCipherRSA.java:221)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2668)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2575)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2480)
It seems I have something similar for version 2.2.1 OS VERSION 7.0 Language is Kotlin if it's matter
Fatal Exception: io.reactivex.exceptions.CompositeException: 2 exceptions occurred.
at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.tryOnError(ObservableCreate.java:85)
at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.onError(ObservableCreate.java:73)
at com.mtramin.rxfingerprint.RsaDecryptionObservable.onAuthenticationSucceeded(RsaDecryptionObservable.java:95)
at com.mtramin.rxfingerprint.FingerprintObservable$2.onAuthenticationSucceeded(FingerprintObservable.java:104)
at android.hardware.fingerprint.FingerprintManager$MyHandler.sendAuthenticatedSucceeded(FingerprintManager.java:1217)
at android.hardware.fingerprint.FingerprintManager$MyHandler.handleMessage(FingerprintManager.java:1148)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
@PingForward Are you using dialog fragment? My issue was resolved by checking if the fragment was added before or not.
@PingForward The stacktrace you shared seems like a different issue. It looks like RxFingerprint is not able to correctly decrypt the value you passed in. Was the value previously encrypted by RxFingerprint with RSA?
@iprasla No, this is regular fragment (MvpAppCompatFragment from com.arello-mobile:moxy lib) @Mauin Yes, the encrypted string is correct I used decript function in onStart() of fragment
fun checkIfCanUseFingerPrint(context: Context) {
if (isFingerprintAvailable(context)) {
val encryptedString = getEncryptedPassword()
if (encryptedString.isNotEmpty()) {
startListenFingerPrint(context, encryptedString)
}
}
}
startListenFingerPrint
disposableDecript = RxFingerprint.decrypt(EncryptionMethod.RSA, context, key, encriptedString)
.subscribe({ decryptionResult ->
***
}, { throwable ->
if (RxFingerprint.keyInvalidated(throwable)) {
***
}
**Log.d("RxFingerprint", throwable.message)** // error here, but it's not NPE
})
}
I dispose disposableDecript in onDestroy maybe I should move it in to onStop, hmm
Keeping the same lifecycle between subscribing and disposing would be a good idea to try I think onStart()
-> onStop()
I'm closing this for inactivity. If you see further issues feel free to re-open this issue or create a new one.
My production code is crashing and the crash log from the play store ANRs & Crashes give me following log. What could be causing this?