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

[Sentry] Error: Account name already exists #26748

Open
sentry-io bot opened this issue Aug 29, 2024 · 7 comments · May be fixed by #26959
Open

[Sentry] Error: Account name already exists #26748

sentry-io bot opened this issue Aug 29, 2024 · 7 comments · May be fixed by #26959
Assignees
Labels
area-Sentry error reporting to sentry regression-prod-12.1.0 Regression bug that was found in production in release 12.1.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-hardware-wallets type-bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented Aug 29, 2024

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)
@Gudahtt Gudahtt added the type-bug Something isn't working label Aug 29, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Aug 29, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Aug 29, 2024
@Gudahtt Gudahtt added regression-prod-10.2.0 Sev2-normal Normal severity; minor loss of service or inconvenience. labels Aug 29, 2024
@gauthierpetetin gauthierpetetin added regression-prod-12.1.0 Regression bug that was found in production in release 12.1.0 team-hardware-wallets and removed regression-prod-10.2.0 labels Aug 29, 2024
@Akaryatrh
Copy link
Contributor

Akaryatrh commented Aug 30, 2024

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.

  • remove all existing ledger accounts
  • add new MM account and name it "Ledger 1"
  • add new hardware account, select Ledger and and select first account
  • See that error "Account name already exists" is displayed above account list
  • See that we have an uncaught error "Account name already exists" on console.

(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
Copy link

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

@Akaryatrh
Copy link
Contributor

Akaryatrh commented Sep 2, 2024

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).

Copy link
Contributor

github-actions bot commented Dec 2, 2024

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 github-actions bot added the stale issues and PRs marked as stale label Dec 2, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Dec 3, 2024
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Dec 3, 2024
@angelcheung22 angelcheung22 reopened this Dec 3, 2024
@github-project-automation github-project-automation bot moved this from Fixed to To be fixed in Bugs by team Dec 3, 2024
@github-actions github-actions bot removed the stale issues and PRs marked as stale label Dec 3, 2024
@hjetpoluru hjetpoluru added the area-Sentry error reporting to sentry label Dec 4, 2024
@hjetpoluru hjetpoluru changed the title Error: Account name already exists [Sentry] Error: Account name already exists Dec 4, 2024
@angelcheung22
Copy link

angelcheung22 commented Feb 24, 2025

Reference ticket: 'Multiple devices not supported yet, please forget your previous device first before adding a new one'
https://app.zenhub.com/workspaces/cet-metamask-hardware-wallets-6566ee6aedc46007d5a260bb/issues/gh/metamask/metamask-extension/30519

@gantunesr
Copy link
Member

Reference ticket: 'Multiple devices not supported yet, please forget your previous device first before adding a new one' https://app.zenhub.com/workspaces/cet-metamask-hardware-wallets-6566ee6aedc46007d5a260bb/issues/gh/metamask/metamask-extension/30519

Hi @angelcheung22, is this ticket you linked a variation of this bug or a new one? I can't open the link so it is unclear to me. If this bug about account naming has its root on the accounts-controller then it should be delegate to my team to solve

@Akaryatrh
Copy link
Contributor

@gantunesr

  • issue originaly comes from preference controller as account controller called function throws an error that is not caught. But this function is now deprecated and I actually removed it on my PR.
  • indeed account naming happens inside account-controller, but it's also done on metamask-controller side (because we append hdpath description to the account name, and i don't think account controller has this info). Having both sides naming the accounts actually creates race condition issues (that I encountered in my PR).
  • About the above linked ticket from zenhub (here's the GH link), It has been added because the same"Account name already exists" has been seen during testing.

I think it would be great to involve account team in the resolution of this ticket 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Sentry error reporting to sentry regression-prod-12.1.0 Regression bug that was found in production in release 12.1.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-hardware-wallets type-bug Something isn't working
Projects
Archived in project
Status: To be triaged
Development

Successfully merging a pull request may close this issue.

8 participants