MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.86k stars 4.84k forks source link

Error: Account name already exists #26748

Open sentry-io[bot] opened 2 weeks ago

sentry-io[bot] commented 2 weeks ago

Sentry Issue: METAMASK-XBQ5

Error: Account name already exists
  at exports.defaultsetAccountLabel (app/scripts/controllers/preferences.js:441:26)
  at MetamaskController.unlockHardwareWalletAccount (app/scripts/metamask-controller.js:4218:32)
  at async i.<anonymous> (app/scripts/lib/createMetaRPCHandler.js:23:7)
...
(1 additional frame(s) were not displayed)
Akaryatrh commented 2 weeks ago

I was able to replicate. I'll make the demonstration with a Ledger account but it could be any other hardware wallet account importing action.

(Sorry for the 10s delay around 00:30s, i was unlocking the Ledger device)

BTW, I can not replicate the issue on develop branch, so bug might have been fixed with a recent commit.

Private Zenhub Video

vivek-consensys commented 2 weeks ago

@Akaryatrh I am able to reproduce using the latest develop build.

image.png
Akaryatrh commented 2 weeks ago

New update: finally issue can be reproduced when creating a build, but not on dev mode. I'm investigating where error is not caught then.

EDIT: I also found out that, despite the error message, account was anyway imported. So user ends up with 2 "Ledger 1" accounts on its accounts list (fortunately, real ledger account gets a "ledger" badge so we can identify it).