bitwarden / mobile

Retired Bitwarden mobile app for iOS and Android (MAUI/Xamarin).
https://bitwarden.com
GNU General Public License v3.0
83 stars 11 forks source link

[Android 6] Stable version offers "Unlock with Fingerprint", Beta doesn't. #907

Closed 1AqK1kLtAzkWAkk9i0YkQXo6KXwAx9AmzgFhLtV closed 4 years ago

1AqK1kLtAzkWAkk9i0YkQXo6KXwAx9AmzgFhLtV commented 4 years ago

Describe the Bug

In the stable version (2.3.1 (2257)), under Android 6.0 Marshmallow (Samsung Galaxy Tab S 10.5" / Android 6.0.1), Bitwarden offers me the option "Unlock with Fingerprint" in the settings.

In the beta version (since at least 2.3.1 (2353)), Bitwarden does not offer it anymore on my tablet. Despite the presence of a fingerprint sensor built into this tablet.

:information_source: As soon as I return to the stable version, this option reappears (and is fully functional).

Screenshots — Stable version, 2.3.1 (2257)

View me ... :point_left: ![20200426_221432](https://user-images.githubusercontent.com/4764956/82132445-150f1580-97e0-11ea-8d31-80dca1feb02f.jpg) ![20200426_222128](https://user-images.githubusercontent.com/4764956/82132448-18a29c80-97e0-11ea-9c17-73ee12f13ddd.jpg)

Screenshots — Beta version, 2.3.1 (2353)

View me ... :point_left: ![20200426_224026](https://user-images.githubusercontent.com/4764956/82132453-29531280-97e0-11ea-96d7-a46d47451697.jpg) ![20200426_224116](https://user-images.githubusercontent.com/4764956/82132454-2bb56c80-97e0-11ea-9948-e83f448d4da7.jpg)

Remarks

If during the transition from the stable version to the beta, the option "Unlock with Fingerprint" was on "Enabled", it will still be visible in the settings and marked as "Enabled", but:

Probable cause

This commit from this PR which updates the package "Plugin.Fingerprint" from version 1.4.9 to v2. However, according to this README, Android 6.0 is still listed as supported (updated last month).

Interesting links about this plugin:

1 I recently tested to compile the latest version of Bitwarden with the "Plugin.Fingerprint" package in version 2.1.0 and 2.0.0 (with these two, Bitwarden also successfully compiles, but the problem remains ...).

Resolution

You will have to see on your side if it's an upstream bug (requiring a report on the repo of @smstuebe) or not. :octocat: I am available for additional tests if necessary. :thumbsup:

mpbw2 commented 4 years ago

@contribucious I'm unable to reproduce this on the hardware I have at my disposal so I'm attempting to use an emulator. On a fresh 6.0 emulator image, the fingerprint unlock option is missing from Bitwarden settings. As soon as I go into Android security settings and add a fingerprint, the option becomes available in Bitwarden. Now I'm guessing you already have a fingerprint or two setup on your device, but just out of curiosity - can you try adding another one, then restart Bitwarden and see if the option is available?

mpbw2 commented 4 years ago

@contribucious Can you see if this build fixes the problem:

[link removed - build in beta]

mpbw2 commented 4 years ago

@contribucious Sorry to spam you :) We pushed an update to beta (give it an hour or two) so you can just test from there. Thanks!

1AqK1kLtAzkWAkk9i0YkQXo6KXwAx9AmzgFhLtV commented 4 years ago

TL;DR

Explanation: Samsung Pass SDK support removed from "Plugin.Fingerprint" package in version 2.0.0 of the latter (see 1 and 2 + there).

Percentage of certainty of the cause: 99%.

:arrow_right: Android 6.0 Marshmallow used in my case :heavy_check_mark: ... :arrow_righthook: ... but special case — [official]_ upgrade.

(cc @kspearrin)


Hello @mportune-bw,

I directly tested your apk (to go faster) and no improvement, despite switching to the password system in Android temporarily (to be able to delete all my three fingerprints) then reactivation (to reintroduce one), followed by a check in Bitwarden (freshly launched).

But I clearly think I have found the cause now. :thumbsup: :arrow_right_hook: And it relates to Samsung specifically (hence the non-reproducibility in your Android emulator).

Introduction

I had seen it right apparently: the problem seems to be related to the transition to v2 of the "Plugin.Fingerprint" package ... which removes support for the Samsung Pass SDK for fingerprint management. See this commit and this one of the same name + the diff between 1.4.9 and 2.0.0 here.

:point_right: The problem

Basically, we tend to think that the native support for fingerprints in Android (FingerprintManageralthough now deprecated in favor of BiometricPrompt) requires just one condition: Android 6.0 Marshmallow or higher.

BUT some (if not all) Samsung devices that were created before Marshmallow, like my Samsung Galaxy Tab S 10.5" tablet from 2014, despite an official upgrade to Marshmallow (6.0.1) from KitKat (4.4.2), still only support the Samsung Pass SDK for fingerprint management. Explanations here but several sources confirm this.

That explains a lot

This now also explains why, while I have no problem on my Android 9 smartphone, lots of apps on my tablet do not have the Fingerprint option in the settings (or have this option grayed out with the phrase "Not supported on your device", this is the case with LastPass for example), while other apps have the option and the corresponding functional support (these are the ones that support the Samsung Pass SDK, quite simply).

Conclusion

I will have to live with the PIN system only from now on my tablet therefore for Bitwarden, since @smstuebe wanted to remove the support for the Samsung Pass SDK (known to be bugged it seems, by the way).

Sorry for the length.


@smstuebe Hello. Could you confirm that my reasoning above is correct? Do you think your phrase "replaced custom dialog and Samsung pass with BiometricPrompt" in the changelog of your v2 explains all this? Thank you in advance.

mpbw2 commented 4 years ago

Thanks for testing @contribucious - and your conclusion makes perfect sense. However several of our play store reviews regarding recent broken fingerprint support are using devices that should have access to FingerprintManager & BiometricPrompt (unless a decision was made to exclude those official SDKs in their updated system images for some reason - lack of drivers maybe?)

Galaxy S9 (Android 10) Galaxy Note 8 (Android 9) Galaxy S7 (Android 8) UMIDIGI X (Android 9) vivo 1910 (Android 9)

1AqK1kLtAzkWAkk9i0YkQXo6KXwAx9AmzgFhLtV commented 4 years ago

Hmm ... That seems to be another problem however. :relaxed: But if @smstuebe goes through here, he might be able to light that up too. :thumbsup: