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: crash during pairing request from Ledger #8936

Merged
merged 10 commits into from
Mar 18, 2024

Conversation

dawnseeker8
Copy link
Contributor

Description

This PR fix the #8641 which cause metamask app crash when user reject pair issue request in ledger in android.

upgrade react-native-ble-plx library to latest version which contain the fix for android bluetooth disconnected exception not caught in native code.

Related issues

Fixes: #8641

Manual testing steps

  1. From Android settings>connected devices> see all make sure LNX not currently paired
  2. Have LNX unlocked and the Ethereum app opened
  3. Unlock MMM
  4. Tap accounts menu from wallet view
  5. Select add account or hardware wallet
  6. Tap Add hardware wallet
  7. Tap Ledger
  8. Grant location permission with Only this time
  9. Tap Continue when LNX is found
  10. From LNX select Cancel pairing
  11. now the scan screen with loading and later, retry button will appear
  12. Click retry, this time, we confirm pair in both ledger and MM mobile screen.
  13. new Ledger account is added.

On second attempt, note MetaMask keeps stopping

Screenshots/Recordings

Before

https://recordit.co/Y4JaFbIsEe

After

Screen_Recording_20240307_162751_MetaMask.mp4

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@dawnseeker8 dawnseeker8 changed the title Fix/8641 Fix the ledger pair issue which cause the app crash Fix: Bug fix for 8641 to fix the app crash during user reject pair connection Mar 14, 2024
@dawnseeker8 dawnseeker8 changed the title Fix: Bug fix for 8641 to fix the app crash during user reject pair connection fix: A bug fix for 8641 to fix the app crash during user reject pair connection Mar 14, 2024
Copy link

socket-security bot commented Mar 14, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/react-native-ble-plx@3.1.2 Transitive: environment, eval, filesystem, network, shell, unsafe +394 156 MB dominik-czupryna-withintent

🚮 Removed packages: npm/react-native-ble-plx@3.1.1

View full report↗︎

@dawnseeker8 dawnseeker8 added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 14, 2024
Copy link
Contributor

github-actions bot commented Mar 14, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: c1c7464
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c819472b-710b-409d-9603-33d6a194a636

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

@dawnseeker8
Copy link
Contributor Author

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.74%. Comparing base (4de7cef) to head (a27ed2b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8936   +/-   ##
=======================================
  Coverage   43.74%   43.74%           
=======================================
  Files        1273     1273           
  Lines       31103    31103           
  Branches     3161     3161           
=======================================
  Hits        13606    13606           
  Misses      16684    16684           
  Partials      813      813           

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

package.json Outdated Show resolved Hide resolved
@gantunesr gantunesr changed the title fix: A bug fix for 8641 to fix the app crash during user reject pair connection fix: crash during pairing request from Ledger Mar 15, 2024
@gantunesr gantunesr added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 15, 2024
Copy link
Contributor

github-actions bot commented Mar 15, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 7223d8d
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/afbd7218-ad1e-4a52-82b3-663d2e1230ee

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

@dawnseeker8 dawnseeker8 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 15, 2024
Copy link
Contributor

github-actions bot commented Mar 15, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 01cee36
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/846f995c-0871-4e23-a8aa-c4b8e28a3d85

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

@gantunesr gantunesr removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 15, 2024
@gantunesr gantunesr added the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 15, 2024
@dawnseeker8
Copy link
Contributor Author

Smoke e2e tests pass #8936

@gantunesr
Copy link
Member

QA builds

Copy link

sonarcloud bot commented Mar 18, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@dawnseeker8 dawnseeker8 merged commit 4fb3968 into main Mar 18, 2024
30 checks passed
@dawnseeker8 dawnseeker8 deleted the fix/8641-ledger-pair-issue branch March 18, 2024 07:55
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 18, 2024
@metamaskbot metamaskbot added the release-7.19.0 Issue or pull request that will be included in release 7.19.0 label Mar 18, 2024
@vivek-consensys
Copy link
Contributor

Fix working as expected, testing on Samsung Android 13:

Screen_Recording_20240318_113312_MetaMask-QA.mp4

@vivek-consensys vivek-consensys added the QA Passed A successful QA run through has been done label Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.19.0 Issue or pull request that will be included in release 7.19.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-hardware-wallets
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: MetaMask stops when pairing request is rejected from Ledger Nano X
5 participants