Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Onboarding failing biometrics locks screen for user instead of disabling biometrics and continuing with the onboarding #12120

Conversation

Daniel-Cross
Copy link
Contributor

@Daniel-Cross Daniel-Cross commented Oct 31, 2024

Description

During the course of onboarding, if the user enables Face ID to log in to the app, but the Face ID is unsuccessful in reading the users face, or the user cancels the Face ID check, the user is then locked out of the app and kicked out of the onboarding flow. When they sign back in they are taken to the wallet screen.

I have added a fix so that if the Face ID fails or the user cancels the Face ID check, Face ID will be disabled and the user will have to log in with their password. The onboarding process will also continue without locking the user out of the app.

The fix isn't 'ideal' as we use a catch block to catch an error and then perform some state setting, when ideally a catch should be used exclusively for error handling. However, when Biometrics fail, React Native throws an error that ends up in the catch. I also would prefer an enum to be used but we are in a JS file instead of a TS file.

To test the issue repeat the following:

  1. Install the app on device.
  2. Start the onboarding and enter a new password.
  3. Enable Face ID (iOS) and cover the camera so the Face ID fails.
  4. Then hit cancel, or repeat the process and hit cancel when the second alert appears.
  5. You should then be pushed through to the next onboarding screen and you should not be sent back to the lock screen and be asked to log in again.

Related issues

Fixes: https://github.com/orgs/MetaMask/projects/60/views/16?pane=issue&itemId=84422135&issue=MetaMask%7Cmetamask-mobile%7C11964

Manual testing steps

  1. Install the app on device.
  2. Start the onboarding and enter a new password.
  3. Enable Face ID (iOS) and cover the camera so the Face ID fails.
  4. Then hit cancel, or repeat the process and hit cancel when the second alert appears.
  5. You should then be pushed through to the next onboarding screen and you should not be sent back to the lock screen and be asked to log in again.

Screenshots/Recordings

Before

After

ScreenRecording_10-31-2024.14-11-32_1.MP4

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
Copy link
Contributor

github-actions bot commented Oct 31, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 1a8fb02
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b0aa0910-b1d5-47e9-a1da-c9bd88e3be46

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Daniel-Cross Daniel-Cross added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 31, 2024
Copy link
Contributor

github-actions bot commented Oct 31, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: efbb106
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/33d878b6-08ea-447c-8e76-1a2a5be58aa9

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Daniel-Cross Daniel-Cross added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 31, 2024
Copy link
Contributor

github-actions bot commented Oct 31, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: fcb7a73
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/5fb73ff7-dc75-42ad-8f28-b156d224121f

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Daniel-Cross Daniel-Cross added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Oct 31, 2024
…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
@Daniel-Cross Daniel-Cross added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 62856c5
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/09a58ac9-bdc0-4172-9866-5a1335781693

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.60%. Comparing base (771100f) to head (472b261).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12120      +/-   ##
==========================================
+ Coverage   55.58%   55.60%   +0.01%     
==========================================
  Files        1782     1782              
  Lines       40085    40203     +118     
  Branches     4993     5018      +25     
==========================================
+ Hits        22280    22353      +73     
- Misses      16282    16316      +34     
- Partials     1523     1534      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
@Cal-L Cal-L marked this pull request as ready for review November 5, 2024 16:23
@Cal-L Cal-L requested a review from a team as a code owner November 5, 2024 16:23
…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
…iometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled
Copy link

sonarqubecloud bot commented Nov 7, 2024

@Daniel-Cross Daniel-Cross added this pull request to the merge queue Nov 7, 2024
Merged via the queue into main with commit b2c9110 Nov 7, 2024
37 checks passed
@Daniel-Cross Daniel-Cross deleted the 11964-bug-onboarding-create-wallet-failing-biometrics-after-creating-password-navigates-to-unlock-screen-should-continue-onboarding-with-biometrics-disabled branch November 7, 2024 11:44
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2024
@gauthierpetetin gauthierpetetin added the release-7.36.0 Issue or pull request that will be included in release 7.36.0 label Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.36.0 Issue or pull request that will be included in release 7.36.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
Archived in project
5 participants