android / security-samples

Multiple samples showing the best practices in security APIs on Android.
Apache License 2.0
938 stars 395 forks source link

Meizu crashed when using AndroidKeyStore #33

Closed codingjeremy closed 4 years ago

codingjeremy commented 5 years ago

Issue by jimmysuncpt Thursday Jan 03, 2019 at 07:30 GMT Originally opened as https://github.com/googlesamples/android-FingerprintDialog/issues/54


There are crashes in some Meizu phones, such as M5 note, PRO 7 Plus and so on. The system version is Android 7.0. The log is:

java.util.concurrent.TimeoutException: android.security.keystore.AndroidKeyStoreUnauthenticatedAESCipherSpi$CBC$PKCS7Padding.finalize(AndroidKeyStoreUnauthenticatedAESCipherSpi.java) timed out after 20 seconds
    at android.os.BinderProxy.transactNative(BinderProxy.java)
    at android.os.BinderProxy.transact(BinderProxy.java:626)
    at android.security.IKeystoreService$Stub$Proxy.abort(IKeystoreService.java:1341)
    at android.security.KeyStore.abort(KeyStore.java:538)
    at android.security.keystore.AndroidKeyStoreCipherSpiBase.finalize(AndroidKeyStoreCipherSpiBase.java:744)
    at android.security.keystore.AndroidKeyStoreUnauthenticatedAESCipherSpi$CBC$PKCS7Padding.finalize(AndroidKeyStoreUnauthenticatedAESCipherSpi.java)
    at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:239)
    at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:226)
    at java.lang.Thread.run(Thread.java:761)

How to fix it?

nic0lette commented 4 years ago

The sample was ported to use BiometricPrompt and so I'm hopeful that this issue would be resolved. If it's still occurring, please open another issue.