oblador / react-native-keychain

:key: Keychain Access for React Native
MIT License
3.18k stars 519 forks source link

Wrapped error: User not authenticated on Android with TouchId and FaceId available #327

Open hoangcxa opened 4 years ago

hoangcxa commented 4 years ago

Hi, I'm using Samsung S9 (it has touch Id and faceId ).

Step to reproduce : install new project and add react-native-keychain;

on set data : Keychain.setInternetCredentials(server,username,password, {accessControl:Keychain.ACCESS_CONTROL.BIOMETRY_ANY});

on get data : const credentials = await Keychain.getInternetCredentials(server);

actual : - When use touchId there's credential callback.

Please help.

hoangcxa commented 4 years ago

I'm using : { "react-native-keychain": "^5.0.1", "react-native": "0.61.5" }

10xamohan commented 4 years ago

Same Issue, when Running on Device with Face and touch both, Biometric authorisation works but decryption from keystore fails : { "framesToPop":1, "nativeStackAndroid":[ { "methodName":"decryptToResult", "lineNumber":616, "file":"KeychainModule.java", "class":"com.oblador.keychain.KeychainModule" }, { "methodName":"decryptCredentials", "lineNumber":592, "file":"KeychainModule.java", "class":"com.oblador.keychain.KeychainModule" }, { "methodName":"getGenericPassword", "lineNumber":293, "file":"KeychainModule.java", "class":"com.oblador.keychain.KeychainModule" }, { "methodName":"getGenericPasswordForOptions", "lineNumber":321, "file":"KeychainModule.java", "class":"com.oblador.keychain.KeychainModule" }, { "methodName":"invoke", "lineNumber":-2, "file":"Method.java", "class":"java.lang.reflect.Method" }, { "methodName":"invoke", "lineNumber":371, "file":"JavaMethodWrapper.java", "class":"com.facebook.react.bridge.JavaMethodWrapper" }, { "methodName":"invoke", "lineNumber":150, "file":"JavaModuleWrapper.java", "class":"com.facebook.react.bridge.JavaModuleWrapper" }, { "methodName":"run", "lineNumber":-2, "file":"NativeRunnable.java", "class":"com.facebook.react.bridge.queue.NativeRunnable" }, { "methodName":"handleCallback", "lineNumber":883, "file":"Handler.java", "class":"android.os.Handler" }, { "methodName":"dispatchMessage", "lineNumber":100, "file":"Handler.java", "class":"android.os.Handler" }, { "methodName":"dispatchMessage", "lineNumber":26, "file":"MessageQueueThreadHandler.java", "class":"com.facebook.react.bridge.queue.MessageQueueThreadHandler" }, { "methodName":"loop", "lineNumber":228, "file":"Looper.java", "class":"android.os.Looper" }, { "methodName":"run", "lineNumber":225, "file":"MessageQueueThreadImpl.java", "class":"com.facebook.react.bridge.queue.MessageQueueThreadImpl$4" }, { "methodName":"run", "lineNumber":919, "file":"Thread.java", "class":"java.lang.Thread" } ], "userInfo":null, "message":"Wrapped error: User not authenticated", "code":"E_CRYPTO_FAILED", "line":2132, "column":45, "sourceURL":"http://localhost:8081/index.bundle?platform=android&dev=true&minify=false" }"'"

krutkowski86 commented 4 years ago

+1

gastonyelmini commented 4 years ago

Same issue

AnmolShrma commented 4 years ago

Having the same issue. Any updates on this.

cschultz1272 commented 4 years ago

+1

john-y-pazekha commented 4 years ago

@cschultz1272 @AnmolShrma @gastonyelmini @krutkowski86 @10xamohan @hoangcxa

Gentlemen, I need your help to reproduce this issue. Since it happens only on specific combination of phone and Android version, I need to know what exactly you're running.

Could you please use this APK and attach here the report it produced? get-device-info.apk.zip

Best regards, John

AnmolShrma commented 4 years ago

@cschultz1272 @AnmolShrma @gastonyelmini @krutkowski86 @10xamohan @hoangcxa

Gentlemen, I need your help to reproduce this issue. Since it happens only on specific combination of phone and Android version, I need to know what exactly you're running.

Could you please use this APK and attach here the report it produced? get-device-info.apk.zip

Best regards, John

@john-y-pazekha Not able to Install the apk, getting parser error for the package.

NicholasIoanJones commented 4 years ago

Same issue. Cant install the apk - adb: failed to install get-device-info.apk: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI] I'm on Android S10e (SM-G970U), Android 10 Fingerprint works fine. Face is recognized but fails to decrypt.

Screen Shot 2020-06-23 at 8 50 50 AM

ifero commented 3 years ago

I'm facing the same issue. The app is able to authenticate through fingerprint, but not through face-unlock. This leads to a really bad UX, especially for those that don't have fingerprint on their device, but only face-unlock. Does any of you found a workaround?