nativescript-fingerprint-auth icon indicating copy to clipboard operation
nativescript-fingerprint-auth copied to clipboard

fingerprint-auth.available: TypeError: Cannot read property 'isHardwareDetected' of null

Open cloudhx opened this issue 5 years ago • 4 comments

When running my app on a new Android 9 device (previously running on Android 7 without this problem), it reports the following error:

fingerprint-auth.available: TypeError: Cannot read property 'isHardwareDetected' of null

Method isHardwareDetected was added in API level 23 and deprecated in API level 28 which is Android 9 Pie, I was thinking this might be an issue for API level 28 and later versions.

cloudhx avatar Jan 15 '20 13:01 cloudhx

Any updates on this issue?

TPham92 avatar May 06 '20 02:05 TPham92

I'm experiencing the same issue on Android 9, Phone Model SM-A105FN (PPR1.180610.011) (this model doesn't have a fingerprint sensor?)

Uncaught (in promise): TypeError: Cannot read property 'isHardwareDetected' of null TypeError: Cannot read property 'isHardwareDetected' of null

However, I can't replicate the same issue on a phone with the same Android version but with a fingerprint sensor. I think this is happening if the phone doesn't have a fingerprint sensor and the API level is 28 or higher.

Pandishpan avatar May 11 '20 21:05 Pandishpan

Thanks @Pandishpan I think it makes sense, I will check my devices and also see if there is a way to catch the exception in this case.

cloudhx avatar May 24 '20 12:05 cloudhx

+1.

Phone is without fingerprint sensor but with faceid.

The error seems to be in fingerprint-auth.android.js - a simple check for fingerprintManager not being undefined would fix the issue.

I assume that the android version of the plugin doesn't support face-id - because I don't see any code related to it.

erjdriver avatar May 24 '20 16:05 erjdriver