smstuebe / xamarin-fingerprint

Xamarin and MvvMCross plugin for authenticate a user via fingerprint sensor
Microsoft Public License
490 stars 115 forks source link

System.NullReferenceException: Object reference not set to an instance of an object. #119

Closed xellDart closed 2 years ago

xellDart commented 5 years ago

Hi, i get error on your plugin, i already add all permission to android manifest My minSDK is 23 (Lollipop)

My code: public static async Task isFingerUserAsync() { var availability = await CrossFingerprint.Current.GetAvailabilityAsync(); Console.WriteLine(availability); var result = await CrossFingerprint.Current.AuthenticateAsync("Prove you have fingers!"); if (result.Authenticated) { return true; } return false; }

Crashlog

12-09 20:01:42.970 D/Mono (16175): Assembly Ref addref Plugin.Fingerprint.Abstractions[0x7dfc636800] -> System.Threading.Tasks[0x7e1f8d6980]: 3 12-09 20:01:42.973 D/Mono (16175): Assembly Ref addref Plugin.Fingerprint[0x7dfc636780] -> Plugin.Fingerprint.Android.Samsung[0x7dfc636a00]: 2 12-09 20:01:42.981 D/SM_SDK (16175): Could not find ContextProvider 12-09 20:01:42.981 D/SM_SDK (16175): versionCode: -1 12-09 20:01:42.981 D/SM_SDK (16175): Add com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY permission 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): com.samsung.android.sdk.SsdkUnsupportedException: This is not Samsung device. 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at com.samsung.android.sdk.pass.Spass.initialize(Unknown Source:112) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at md58432a647068b097f9637064b8985a5e0.ButtonRenderer_ButtonClickListener.n_onClick(Native Method) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at md58432a647068b097f9637064b8985a5e0.ButtonRenderer_ButtonClickListener.onClick(ButtonRenderer_ButtonClickListener.java:30) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at android.view.View.performClick(View.java:6291) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at android.view.View$PerformClick.run(View.java:24931) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at android.os.Handler.handleCallback(Handler.java:808) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at android.os.Handler.dispatchMessage(Handler.java:101) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at android.os.Looper.loop(Looper.java:166) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at android.app.ActivityThread.main(ActivityThread.java:7425) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at java.lang.reflect.Method.invoke(Native Method) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) 12-09 20:01:42.993 W/SamsungFingerprintImplementation(16175): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921) 12-09 20:01:43.017 I/mono-stdout(16175): Available Available 12-09 20:01:43.047 D/Mono (16175): Assembly Ref addref WalletOn.Android[0x7e1f95cc80] -> Plugin.CurrentActivity[0x7dfc636480]: 2 12-09 20:01:43.047 D/Mono (16175): Assembly Ref addref Plugin.CurrentActivity[0x7dfc636480] -> Mono.Android[0x7dfc666180]: 30 Unhandled Exception:

System.NullReferenceException: Object reference not set to an instance of an object.

Configuration

**Version of the Plugin: 1.4.7

**Platform: Android 8.0 EMUI 5

**Device hUAWEI p20 lite

smsissuechecker commented 5 years ago

Hi @xperiafan13-rom,

I'm the friendly issue checker. It seems like (75.00 %) 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!

jjwils commented 5 years ago

Experiencing same issue: Version of Plugin: 1.4.9 Platform 29 (pie) Device: google pixel 3

jjwils commented 5 years ago

the fix here solved it for me https://github.com/smstuebe/xamarin-fingerprint/issues/112#issuecomment-425380224