Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crash after successful biometric authentication #8

Open
nikhiljainlive opened this issue Jan 6, 2021 · 0 comments
Open

App Crash after successful biometric authentication #8

nikhiljainlive opened this issue Jan 6, 2021 · 0 comments

Comments

@nikhiljainlive
Copy link

nikhiljainlive commented Jan 6, 2021

Android Device Info:

  • Android 10
  • Samsung M31

The app is crashing when biometric authentication is successful after clicking on LOCK button

From the logcat stacktrace :

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.keystorecrypto, PID: 20738
    java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:506)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100) 
     Caused by: javax.crypto.AEADBadTagException
        at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:517)
        at javax.crypto.Cipher.doFinal(Cipher.java:2055)
        at com.example.keystorecrypto.KeystoreManager.encryptApplicationKey(KeystoreManager.kt:112)
        at com.example.keystorecrypto.SecureLocalManager.loadOrGenerateApplicationKey(SecureLocalManager.kt:55)
        at com.example.keystorecrypto.MainActivity.onAuthenticationSuccessful(MainActivity.kt:118)
        at com.example.keystorecrypto.biometrix.BiometricCallbackV28.onAuthenticationSucceeded(BiometricCallbackV28.java:20)
        at android.hardware.biometrics.BiometricPrompt$1.lambda$onAuthenticationSucceeded$1$BiometricPrompt$1(BiometricPrompt.java:548)
        at android.hardware.biometrics.-$$Lambda$BiometricPrompt$1$ob5suq_ELA05xslg_M8nDaDCttg.run(Unknown Source:2)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:8167)
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100) 
     Caused by: android.security.KeyStoreException: Signature/MAC verification failed
        at android.security.KeyStore.getKeyStoreException(KeyStore.java:1564)
        at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:224)
        at android.security.keystore.AndroidKeyStoreAuthenticatedAESCipherSpi$BufferAllOutputUntilDoFinalStreamer.doFinal(AndroidKeyStoreAuthenticatedAESCipherSpi.java:373)
        at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:506)
        at javax.crypto.Cipher.doFinal(Cipher.java:2055) 
        at com.example.keystorecrypto.KeystoreManager.encryptApplicationKey(KeystoreManager.kt:112) 
        at com.example.keystorecrypto.SecureLocalManager.loadOrGenerateApplicationKey(SecureLocalManager.kt:55) 
        at com.example.keystorecrypto.MainActivity.onAuthenticationSuccessful(MainActivity.kt:118) 
        at com.example.keystorecrypto.biometrix.BiometricCallbackV28.onAuthenticationSucceeded(BiometricCallbackV28.java:20) 
        at android.hardware.biometrics.BiometricPrompt$1.lambda$onAuthenticationSucceeded$1$BiometricPrompt$1(BiometricPrompt.java:548) 
        at android.hardware.biometrics.-$$Lambda$BiometricPrompt$1$ob5suq_ELA05xslg_M8nDaDCttg.run(Unknown Source:2) 
        at android.os.Handler.handleCallback(Handler.java:883) 
        at android.os.Handler.dispatchMessage(Handler.java:100) 
        at android.os.Looper.loop(Looper.java:237) 
        at android.app.ActivityThread.main(ActivityThread.java:8167) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100) 
I/Process: Sending signal. PID: 20738 SIG: 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant