[Unhandled promise rejection: TypeError: undefined is not an object (evaluating '_expo.default.Fingerprint')]

I’m following a demo on the Fingerprint component in Expo: https://snack.expo.io/@adamjnav/biometrics-api

I’m importing Expo like so:

import Expo, { Constants } from 'expo';

However, I get this error: [Unhandled promise rejection: TypeError: undefined is not an object (evaluating ‘_expo.default.Fingerprint’)]

Am I importing Expo incorrectly? Do I have to do any sort of configuration elsewhere?

Edit: I ran the Demo Snack linked above and it worked perfectly on my iOS and Android device. When I run the code myself though I get the error that the devices aren’t compatible. I have a feeling this error being returned is what’s stopping the devices compatibility being recognised.

Hey @maxcharles01,

So as of SDK32 you can either import specific modules such as import {LocalAuthentication} from 'expo' or if you want the whole package you have to do import * as Expo from 'expo'. Additionally the biometrics API has been renamed to LocalAuthentication as Fingerprint no longer properly described the API as Face Detection was also a possibility. https://docs.expo.io/versions/v32.0.0/sdk/local-authentication/

Sorry about the out of date Snack example, I’ll be sure to update it today. Let me know if you have any questions.


Hiya Adam,

Thanks for the response. I am now using LocalAuthentication and it is working as expected.

In the example the import should import LocalAuthentication

and instead of calling Expo.Fingerprint.methodCall it should now be LocalAuthentication.methodCall

that got it working for me :slight_smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.