metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

[Bug]: Unable to pair to Ledger a second time after removing accounts

Open plasmacorral opened this issue 1 year ago • 2 comments

Describe the bug

chrome 117.0.5938.92 mac Sonoma 14.2.1 Ledger Nano X running firmware 2.1.0 Ethereum app 1.10.1

If I pair the Ledger device, remove the accounts, and try to pair again I am stuck with an Unknown error and unable to add any further Ledger accounts.

The only way I have found so far to get out of this situation is to forget all HID devices and reload the extension.

This was observed in 11.10 RC testing, but confirmed to exist in 11.9.0.

Expected behavior

Should be able to add and remove Ledger accounts repeatedly without having to forget devices and reload extension.

Screenshots/Recordings

https://recordit.co/P9YMp1mOcN

Steps to reproduce

  1. Setup wallet
  2. Connect, unlock and open the Ethereum app on Ledger
  3. Use the add hardware flow to add some Ledger accounts
  4. Remove the Ledger accounts from full screen mode
  5. Use add hardware flow to try and add any Ledger accounts
  6. Note Unknown Error in extension

Error messages or log output

LEDGER:::CREATE APP ERROR 
TransportError {name: 'TransportError', message: "U2F browser support is needed for Ledger. Please u…ion. Also make sure you're on an HTTPS connection", id: 'U2FNotSupported', stack: 'Error\n    at new TransportError (https://metamask.…b.io/eth-ledger-bridge-keyring/bundle.js:22460:22'}
id
: 
"U2FNotSupported"
message
: 
"U2F browser support is needed for Ledger. Please use Chrome, Opera or Firefox with a U2F extension. Also make sure you're on an HTTPS connection"
name
: 
"TransportError"
stack
: 
"Error\n    at new TransportError (https://metamask.github.io/eth-ledger-bridge-keyring/bundle.js:18069:18)\n    at https://metamask.github.io/eth-ledger-bridge-keyring/bundle.js:22460:22"
[[Prototype]]
: 
Error at new TransportError (https://metamask.github.io/eth-ledger-bridge-keyring/bundle.js:18069:18) at https://metamask.github.io/eth-ledger-bridge-keyring/bundle.js:22460:22
stack
: 
"Error\n    at new TransportError (https://metamask.github.io/eth-ledger-bridge-keyring/bundle.js:18069:18)\n    at https://metamask.github.io/eth-ledger-bridge-keyring/bundle.js:22460:22"
[[Prototype]]
: 
Object
constructor
: 
ƒ Error()
message
: 
""
name
: 
"Error"
toString
: 
ƒ toString()
[[Prototype]]
: 
Object
constructor
: 
ƒ Object()
hasOwnProperty
: 
ƒ hasOwnProperty()
isPrototypeOf
: 
ƒ isPrototypeOf()
propertyIsEnumerable
: 
ƒ propertyIsEnumerable()
toLocaleString
: 
ƒ toLocaleString()
toString
: 
ƒ toString()
valueOf
: 
ƒ valueOf()
__defineGetter__
: 
ƒ __defineGetter__()
__defineSetter__
: 
ƒ __defineSetter__()
__lookupGetter__
: 
ƒ __lookupGetter__()
__lookupSetter__
: 
ƒ __lookupSetter__()
__proto__
: 
(...)
get __proto__
: 
ƒ __proto__()
set __proto__
: 
ƒ __proto__()

Version

11.9.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

Ledger

Additional context

No response

Severity

No response

plasmacorral avatar Feb 06 '24 23:02 plasmacorral

Observed the same issue with Ledger on 11.10.0

  1. Create a tx
  2. Disconnect device while signing
  3. Create another tx
  4. Try to connect device
  5. See 'unknown error' message
  6. Can be resolved by deleting hardwallet account and reloading extension https://recordit.co/kdCDL4laWo

sleepytanya avatar Feb 07 '24 20:02 sleepytanya

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

github-actions[bot] avatar May 09 '24 18:05 github-actions[bot]

i am unable to reproduce the issue in metamask extension 11.16.7 which is latest in develop branch. i try both the cases described in comments and it still work to add ledger. the second case of disconnected ledger during signing transaction, will lead to transaction failure status for 10 mins. and then you can do transaction again.

dawnseeker8 avatar Jun 19 '24 09:06 dawnseeker8

Hi @plasmacorral, I have tried to reproduce using the latest versions but did not face this issue with the steps provided.

Chrome: 125.0.6422.142 Metamask Extension: 11.16.12 Ledger Nano X running firmware 2.2.4 Ethereum app 1.10.4

However, I am able to reproduce with the 'Unknown Error' when the ledger device is locked and the user is trying to add/remove the device into MM Extension.

@dawnseeker8 are you able to debug?

vivek-consensys avatar Jun 20 '24 09:06 vivek-consensys

hi, i have fixed the issue with patch to @metamask/eth-ledger-bridge-keyring. the pr is #25462

dawnseeker8 avatar Jun 21 '24 10:06 dawnseeker8