Closed kspearrin closed 2 years ago
Hi @kspearrin,
I'm the friendly issue checker. Thanks for using the issue template :star2: I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.
Any idea what is causing this? I am having a lot crash reports in our latest production app from this. If you don't have the time at the moment I can try to take a stab at it since it's somewhat urgent for us.
Stack trace points here: https://github.com/smstuebe/xamarin-fingerprint/blob/master/src/Plugin.Fingerprint.Android/Dialog/FingerprintDialogFragment.cs#L151
Seems the only null reference possibilities are:
view.
view.FindViewById<TextView>(Resource.Id.fingerprint_txtReason).
Configuration.
Hi, no idea. I see the same possible null reference causes. Or it hast something to do with the time you trigger the authentication in your App (OnAppearing). I tried to reproduce with the sample app and my Nexus 5x, but it did not crash :/
Before this problem I had been using the old v1.2.4 and was not experiencing any crashes. Implemented the same way. All I did was update the lib and adjust to the breaking changes.
Looking at the v1.2.0 tag it seems to be like the only new possibility for a null ref is Configuration.Reason
. https://github.com/smstuebe/xamarin-fingerprint/blob/v1.2.0/src/Plugin.Fingerprint.Android/Dialog/FingerprintDialogFragment.cs#L49
Not sure how could be null in my implementation though.
Hmm do you think it's happening after coming back from a tombstoned state?
Maybe. I only have an emulator to test with so my test cases are somewhat limited. Are you able to test that scenario?
I can try to do so. But I wonder if the dialog should just close itself when going into tombstoned mode. Because: where will it return? The task will not be awaited anymore because the activity has been tombstoned, too and it's button click await state machine doesn't exist anymore (I guess). hmmm 🤔
I just tested it on my emulator with the fingerprint dialog open, then backgrounded overnight. Opened it this morning and no crash.
Still seeing this crash daily in our HockeyApp crash reports. It seems to log the crash in large counts on a single device, which is odd. I have never seen any other crash report this way.
For example, a single device will report 10-30 of the same crash report (above) in the timespan of a few seconds.
Steps to reproduce
I don't have any clear reproduction steps since I am unable to reproduce this myself on an emulator. This appears to be only affecting a subset of users since many are not reporting any issues with it. I only know this is an issue because of HockeyApp crash logs.
Project repo can be found here: https://github.com/bitwarden/mobile
Relevant line?: https://github.com/bitwarden/mobile/blob/master/src/App/Pages/Lock/LockFingerprintPage.cs#L95
Expected behavior
No crash
Actual behavior
Crashing with
NullReferenceException
inFingerprintDialogFragment.OnCreateView
Crashlog
Configuration
Version of the Plugin: 1.4.4
Platform: Multiple Android. I have crash logs for 6.0 all the way to 7.1.2.
Device: Multiple. Nexus 5X, SM-G930F, Pixel, ONEPLUS A3003, etc