question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: Error: Fingerprint operation canceled, iOS no response

See original GitHub issue
  1. I keep getting this Error: Fingerprint operation canceled.. It happens on the SInfo.setItem because I do see start getting logged. I kinda just followed what it says on the docs. I can’t see why it doesn’t work. This only happens on Android.

  2. On iOS I see the biometrics prompt, but I get nothing from SInfo.getItem

  useEffect(() => {
    async function testingLocalAuthentication() {
      try {
        console.log('start');
        const setData = await SInfo.setItem('key1', 'secretStuff', {
          sharedPreferencesName: 'mySharedPrefs',
          keychainService: 'myKeychain',
          touchID: true, //add this key
          kSecAccessControl: 'kSecAccessControlBiometryAny',
        });
        console.log('------------setData: ', setData);
        const response = await SInfo.getItem('key1', {
          touchID: true,
          showModal: true, //required (Android) - Will prompt user's fingerprint on Android
          strings: {
            // optional (Android) - You can personalize your prompt
            description: 'Custom Title ',
            header: 'Custom Description',
          },
          // required (iOS) -  A fallback string for iOS
          kSecUseOperationPrompt: 'We need your permission to retrieve encrypted data',
        });
        console.log('------------response: ', response);
      } catch (error) {
        console.log(error);
      }
    }
    testingLocalAuthentication();
  });

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mCodexcommented, Aug 20, 2020

Out of curiosity, were you able to fix this on the android emulator by having this in a useEffect or did you do the useCallback as shown in the example app. Just curious.

Using the same useEffect you provided

iOS (Tested on Iphone 11 emulator)

Probably a bug, using your sample code the data couldn’t be retrieved. It always return “undefined”. However, I was able to accomplish that removing the touchId: true from getItem. However, this is not right.

Created a dedicated issue here #233

0reactions
douglasjuniorcommented, Apr 5, 2022

Hello guys, this library still maintained?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Fingerprint operation canceled by user" error anytime ...
I'm on a Pixel 7 pro and anytime I'm plugged into my head unit using Android Auto, I'm physically unable to use a...
Read more >
Android fingerprint sensor cancel error if grabbed by another ...
I'm using FingerprintManager in my app and usually all works fine. The main issue I have is that customers sometimes complain that the...
Read more >
How to fix An error has occurred with finger print sensor ...
https://www.youtube.com/channel/UCn1d... Watch some of our popular videos: How to hide active now on messenger on android ; https://www.youtube.
Read more >
When turning off the screen, the fingerprint reader is calling ...
The error details are: onAuthenticationError() is called with error message id 5 and the string: "Fingerprint operation canceled.".
Read more >
Why Does My Fingerprint Sensor Not Working - iToolab
Fingerprint sensors are fast, secure, and widely used on lots of devices including Android and iOS. Fingerprint sensor (Touch ID in iOS) is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found