xamarin-fingerprint icon indicating copy to clipboard operation
xamarin-fingerprint copied to clipboard

In iOS 11 only, when is informed a non-matching fingerprint, an exception occurs in AuthenticateAsync()

Open jaimemorais opened this issue 8 years ago • 4 comments

In iOS 11 only, when is informed a non-matching fingerprint, an exception occurs in AuthenticateAsync() Android and another iOS versions are working normally.

Steps to reproduce

  1. Just call AuthenticateAsync, and inform a non-matching fingerprint.

FingerprintAuthenticationResult result = await CrossFingerprint.Current.AuthenticateAsync("test");

Expected behavior

App ask to inform fingerprint again.

Actual behavior

Exception occurs.

Crashlog

at Plugin.Fingerprint.FingerprintImplementation+<NativeAuthenticateAsync>d__2.MoveNext () [0x00118] in <1bf7c8e7384d488094f946b10a19ae9c>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 at Plugin.Fingerprint.Abstractions.FingerprintImplementationBase+<AuthenticateAsync>d__1.MoveNext () [0x000b3] in C:\Projekte\xamarin-fingerprint\src\Plugin.Fingerprint.Abstractions\FingerprintImplementationBase.cs:18 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.0.0.0/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357

Configuration

Version of the Plugin: 1.4.5 (I tried with the 1.4.6-beta2 and the problem persists)

Platform: Xamarin Forms 2.3.4.247 (running on iOS 11)

Device: Simulator and a physical iPhone 5s .

Thanks!

jaimemorais avatar Sep 26 '17 17:09 jaimemorais

Hi @jaimemorais,

I'm the friendly issue checker. It seems like (37.50 %) you haven't used our issue template :cry: I think it is very frustrating for the repository owners, if you ignore them.

If you think it's fine to make an exception, just ignore this message. But if you think it was a mistake to delete the template, please close the issue and create a new one.

Thanks!

smsissuechecker avatar Sep 26 '17 17:09 smsissuechecker

Hi @jamtemorais I also face this issue on Simulator, but it seems to work fine on a physical device (iPad 12" last gen) I clonned the project to see if i could reproduce the issue, it's caused by a null NSError returned by the xamarin framework when the fingerprint doesnt match on simulator. The crash occur when the package try to interpret this error. As a workaround, you could just catch the exception and reopen the TouchID popup, that is not ideal, but it do the trick

jeremymarabel avatar Oct 17 '17 08:10 jeremymarabel

Thanks for the input. I'll have a look.

smstuebe avatar Oct 17 '17 09:10 smstuebe

facing same issue.anyone found solution?

NeelamPrajapati avatar Jan 20 '18 11:01 NeelamPrajapati