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

The Authenticate request fails with "UnknownError" if the app is completely unloaded on iOS

Open mdima opened this issue 2 years ago • 2 comments

Hello, when I request the fingerprint authorization with the following conditions the authorization fails and I receive an "UnknownError" result. The conditions are:

  1. This happens only on an iOS device (on Android everything works);
  2. The application is completely closed (unloaded);
  3. The application is loaded opening a notification, which opens a ContentPage that requests the authorization (from the DidReceiveRemoteNotification method of the AppDelegate.cs file);

Steps to reproduce

  1. From the DidReceiveRemoteNotification event of the AppDelegate.cs file create a procedure that loads a ContentPage;
  2. Inside the ContentPage, when visible (OnPropertyChanged, PropertyName == "Renderer" && the ContentPage is IsVisible) generate the fingerprint request;
  3. The request will fail immediately with the UnknownError result.

Expected behavior

The Expected behavior is that the fingerprint get successfully requested.

Configuration

Version of the Plugin: 2.1.5

Platform: iOS 15.4.1

Device: Apple iPad Air, also reproduced on an iPhone 12

mdima avatar Apr 27 '22 18:04 mdima

What does result.ErrorMessage say?

smstuebe avatar Apr 27 '22 18:04 smstuebe

The string says "Authentication canceled", status: "UnknownError"... It is very difficult to debug because to reproduce the error the app must be totally unloaded, so I added a "DisplayAlert" to display the result.

Thanks, Michele

mdima avatar Apr 28 '22 04:04 mdima