Invariant Violation: LocalAuthentication.authenticateAsync must be called with a non-empty string on iOS

  1. SDK Version: 34.0.0
  2. iOS

I’m getting the error ‘Invariant Violation: LocalAuthentication.authenticateAsync must be called with a non-empty string on iOS’ when trying to run the following code:

LocalAuthentication.authenticateAsync({ promptMessage: 'Sign into App with your Fingerprint or FaceId', fallbackLabel: 'Use your iPhone passcode to sign into App', })

Here is my app.json:
"infoPlist": { "NSFaceIDUsageDescription": "Give App experiences permission to use FaceID" }

Also, if I call authenticateAsync() with no arguments, it will prompt me to provide my passcode instead of FaceID.

Any ideas?

Hey @coinfielddev,

Can you try running expo install expo-local-authentication to see if that helps? If not, would you be able to create a Github Issue with as much relevant information and a reproducible example, if possible in the form of a Snack, so we can track this properly?

Cheers,
Adam

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