mjwheatley / cordova-plugin-android-fingerprint-auth

A cordova plugin for fingerprint authentication using the hardware fingerprint scanner on devices running Android 6+
Apache License 2.0
169 stars 131 forks source link

java.lang.IllegalStateException #112

Open yoprogramo opened 6 years ago

yoprogramo commented 6 years ago

Hello, unable to replicate on debug, but obtained from Android vitals on play store for several users:

java.lang.IllegalStateException: 
  at android.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:1436)
  at android.app.FragmentManagerImpl.enqueueAction (FragmentManager.java:1454)
  at android.app.BackStackRecord.commitInternal (BackStackRecord.java:707)
  at android.app.BackStackRecord.commit (BackStackRecord.java:671)
  at android.app.DialogFragment.show (DialogFragment.java:230)
  at com.cordova.plugin.android.fingerprintauth.FingerprintAuth$1.run (FingerprintAuth.java:300)
  at android.os.Handler.handleCallback (Handler.java:751)
  at android.os.Handler.dispatchMessage (Handler.java:95)
  at android.os.Looper.loop (Looper.java:154)
  at android.app.ActivityThread.main (ActivityThread.java:6123)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:867)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:757)

Some clue?

mjwheatley commented 6 years ago

It may be happening as your application is resuming from the background. My guess is that the fingerprint dialog was open and then the application was sent to the background. This was a previously reported issue and had been corrected by adding dismissAllowingStateLoss() to the dialog fragment. Try opening the dialog and then put your application in the background and then bring it back to the foreground and see if that helps reproduce the issue.

gtl-girishtanwani commented 6 years ago

Application crashes, might be the same issue on following devices,

1) Huawei Mate 9 Pro (HWLON), Android 8.0 2) Samsung Galaxy A8(2018) (jackpotlte), Android 8.0,

java.lang.IllegalStateException: 
  at android.security.keystore.AndroidKeyStoreUnauthenticatedAESCipherSpi.addAlgorithmSpecificParametersToBegin (AndroidKeyStoreUnauthenticatedAESCipherSpi.java:244)
  at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized (AndroidKeyStoreCipherSpiBase.java:237)
  at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal (AndroidKeyStoreCipherSpiBase.java:495)
  at javax.crypto.Cipher.doFinal (Cipher.java:1736)
  at com.cordova.plugin.android.fingerprintauth.FingerprintAuth.onAuthenticated (FingerprintAuth.java:614)
  at com.cordova.plugin.android.fingerprintauth.FingerprintAuthenticationDialogFragment.onAuthenticated (FingerprintAuthenticationDialogFragment.java:259)
  at com.cordova.plugin.android.fingerprintauth.FingerprintUiHelper$3.run (FingerprintUiHelper.java:167)
  at android.os.Handler.handleCallback (Handler.java:808)
  at android.os.Handler.dispatchMessage (Handler.java:101)
  at android.os.Looper.loop (Looper.java:166)
  at android.app.ActivityThread.main (ActivityThread.java:7425)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)