Skip to content

fix: crash during pairing request from Ledger#8936

Merged
dawnseeker8 merged 10 commits into
mainfrom
fix/8641-ledger-pair-issue
Mar 18, 2024
Merged

fix: crash during pairing request from Ledger#8936
dawnseeker8 merged 10 commits into
mainfrom
fix/8641-ledger-pair-issue

Conversation

@dawnseeker8

Copy link
Copy Markdown
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.

@dawnseeker8 dawnseeker8 added the team-hardware-wallets-deprecated DEPRECATED: please use "team-accounts-framework" instead label Mar 14, 2024
@dawnseeker8 dawnseeker8 requested a review from a team as a code owner March 14, 2024 14:47
@github-actions

Copy link
Copy Markdown
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
@socket-security

socket-security Bot commented Mar 14, 2024

Copy link
Copy Markdown

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 labels Mar 14, 2024
@github-actions

github-actions Bot commented Mar 14, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

@codecov-commenter

codecov-commenter commented Mar 14, 2024

Copy link
Copy Markdown

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.

Comment thread package.json Outdated
@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
@github-actions

github-actions Bot commented Mar 15, 2024

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Mar 15, 2024

Copy link
Copy Markdown
Contributor

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

@dawnseeker8

Copy link
Copy Markdown
Contributor Author

Smoke e2e tests pass #8936

@gantunesr

Copy link
Copy Markdown
Member

QA builds

@sonarqubecloud

Copy link
Copy Markdown

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
@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
Copy Markdown
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 QA testing has been completed and passed label Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed release-7.19.0 Issue or pull request that will be included in release 7.19.0 team-hardware-wallets-deprecated DEPRECATED: please use "team-accounts-framework" instead

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