MetaMask / metamask-extension

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

[Bug]: Creating a second snap account without hitting OK on the confirmation/success message of the first account, creates out of sync #21448

Closed plasmacorral closed 1 week ago

plasmacorral commented 11 months ago

Describe the bug

Uncertain if this is an issue with the Snap Simple Keyring v1.0.1 (SSK) or an issue on the extension side. If I create or try to import a second account before I have engaged the CTA on the confirmation/success message from the first account, then both accounts are created in the extension but do not exist in the snap and errors are generated.

Expected behavior

Should be able to create/import multiple snap accounts without having to take action on CTA in success message. This was previously reported in https://github.com/MetaMask/accounts-planning/issues/108 but that did not include details about the errors and the user impact of getting the snap account list and the extension account list out of sync. In this condition the created accounts are not usable in any async approval flows.

Screenshots

Errors when second account is a private key imported through SSK:

Error shown when both new accounts are created from the snap: `

Recording of creating 2 new snap accounts: https://recordit.co/zmxvDa5vGQ

Steps to reproduce

  1. Create a wallet
  2. connect to and install the SSK v1.0.1 snap
  3. Create a new account
  4. tap create on extension
  5. do NOT tap OK on the confirmation/success
  6. Try to either import a private key through SSK, or create a new account in SSK
  7. Tap Ok from the first account success message
  8. Tap Create for the second account
  9. Tap Ok on the success message for the second snap account
  10. Note errors in the snap and no accounts shown, but 2 accounts do exist in extension

Error messages or log output

See screenshots above

Version

11.4.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

Edge case- sev 2

github-actions[bot] commented 8 months ago

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.

ccharly commented 7 months ago

Still an issue as of today.

Encountered this one using this reference on develop.

However, mine might be a variation of it, since the extension seems to "crash" (you'll get an infinite spinner).

For the sake of completeness, here's a quick transcript of it:

  1. Create a new account (1)
  2. Confirm the account (1) on MM
  3. :warning: At this point, we do not hit "OK" to "finalize" the creation flow
  4. Create a new account (again) (2)
  5. :warning: At this point, we have 2 "pending" pages on MM
  6. Hit "OK" for account (1)
  7. Confirm the account (2) on MM
  8. Hit "OK" for account (2)
  9. :red_circle: MM is looping
ccharly commented 7 months ago

https://github.com/MetaMask/metamask-extension/assets/569258/9efa01e5-05a7-4c61-bcc9-680eadf7d5c8

github-actions[bot] commented 1 month ago

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] commented 1 week ago

This issue was closed because there has been no follow up activity in the last 45 days. If you feel this was closed in error, please reopen and provide evidence on the latest release of the extension. Thank you for your contributions.