metamask-mobile
metamask-mobile copied to clipboard
[Bug]: MetaMask stops when pairing request is rejected from Ledger Nano X
Describe the bug
Observed in RC 1 testing for 7.17.0 on Pixel 5a with android 14: When initiating add hardware for Ledger if the user declines the pairing request from the Ledger device, MetaMask stops.
Expected behavior
MetaMask handle user rejection of pairing gracefully, and provide actionable instructions in an error message.
Screenshots/Recordings
Recording: https://recordit.co/Y4JaFbIsEe
Steps to reproduce
- From Android settings>connected devices> see all make sure LNX not currently paired
- Have LNX unlocked and the Ethereum app opened
- Unlock MMM
- Tap accounts menu from wallet view
- Select
add account or hardware wallet
- Tap
Add hardware wallet
- Tap
Ledger
- Grant location permission with
Only this time
- Tap
Continue
when LNX is found - From LNX select
Cancel pairing
- Note app closes
- On second attempt, note
MetaMask keeps stopping
Error messages or log output
No response
Version
7.17.0
Build type
None
Device
Pixel 5a with android 14
Operating system
Android
Additional context
iOS device presents no error on first rejection, but then gives a generic error when the second attempt to pair is rejected from the LNX device.
Severity
No response
Related to https://github.com/MetaMask/metamask-mobile/pull/8246
This was an Edge case previously deprioritised after the first release, as it requires a new update mechanism from Ledger. Reference ticket https://app.zenhub.com/workspaces/cet-metamask-hardware-wallets-6566ee6aedc46007d5a260bb/issues/zh/111
Lets add timeout.
@vivek-consensys lets discuss why this is moved to blocked?
The app crash was caused by bluetooth disconnected
error thrown from native code. so timeout
implementation will not work here.
We need to find a way to catch this bluetooth disconnected
exception to prevent this app crash happening again.
Tested locally with no app crashes on Samsung Android 13, flows tested include;
- Reject from LNX without accepting or declining pairing on MMM app
- Reject from LNX and decline pairing on MMM app
- Accept pairing on MMM app and accept from LNX
pending https://github.com/MetaMask/metamask-mobile/pull/8887
related fix https://github.com/MetaMask/metamask-mobile/pull/8873