mibrito707 / cordova-plugin-secure-storage-echo

Secure storage plugin for Apache Cordova
MIT License
73 stars 73 forks source link

Exception InvalidKeyException #29

Open laurentyhuel opened 4 years ago

laurentyhuel commented 4 years ago

Hello,

I have an exception on some devices. It's related to Invalid user authentication validity duration. In README I see this parameter userAuthenticationValidityDuration but I don't know how to pass it via TypeScript. I only have SecureStorageEcho.create(store: string)

11-29 09:43:15.314  6122  6277 E RSA     : java.security.InvalidKeyException: Keystore operation failed
11-29 09:43:15.314  6122  6277 E RSA     :  at android.security.KeyStore.getInvalidKeyException(KeyStore.java:760)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.security.KeyStore.getInvalidKeyException(KeyStore.java:781)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
11-29 09:43:15.314  6122  6277 E RSA     :  at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2668)
11-29 09:43:15.314  6122  6277 E RSA     :  at javax.crypto.Cipher.tryCombinations(Cipher.java:2575)
11-29 09:43:15.314  6122  6277 E RSA     :  at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2480)
11-29 09:43:15.314  6122  6277 E RSA     :  at javax.crypto.Cipher.chooseProvider(Cipher.java:567)
11-29 09:43:15.314  6122  6277 E RSA     :  at javax.crypto.Cipher.init(Cipher.java:831)
11-29 09:43:15.314  6122  6277 E RSA     :  at javax.crypto.Cipher.init(Cipher.java:772)
11-29 09:43:15.314  6122  6277 E RSA     :  at com.crypho.plugins.AbstractRSA.runCipher(AbstractRSA.java:48)
11-29 09:43:15.314  6122  6277 E RSA     :  at com.crypho.plugins.AbstractRSA.decrypt(AbstractRSA.java:66)
11-29 09:43:15.314  6122  6277 E RSA     :  at com.crypho.plugins.AbstractRSA.userAuthenticationRequired(AbstractRSA.java:103)
11-29 09:43:15.314  6122  6277 E RSA     :  at com.crypho.plugins.SecureStorage.execute(SecureStorage.java:111)
11-29 09:43:15.314  6122  6277 E RSA     :  at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:117)
11-29 09:43:15.314  6122  6277 E RSA     :  at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
11-29 09:43:15.314  6122  6277 E RSA     :  at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
11-29 09:43:15.314  6122  6277 E RSA     :  at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
11-29 09:43:15.314  6122  6277 E RSA     :  at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.os.MessageQueue.nativePollOnce(Native Method)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.os.MessageQueue.next(MessageQueue.java:331)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.os.Looper.loop(Looper.java:149)
11-29 09:43:15.314  6122  6277 E RSA     :  at android.os.HandlerThread.run(HandlerThread.java:65)
11-29 09:43:15.314  6122  6277 E RSA     : Caused by: android.security.KeyStoreException: Invalid user authentication validity duration
11-29 09:43:15.314  6122  6277 E RSA     :  at android.security.KeyStore.getKeyStoreException(KeyStore.java:694)
11-29 09:43:15.314  6122  6277 E RSA     :  ... 24 more