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

[Bug]: A cascade of issues happen when using Localhost with chainId 1, all seem related to loosing track of the Nonce

Open seaona opened this issue 2 years ago • 4 comments

Describe the bug

Problem: a cascade of issues happen when I am using a localhost network with chainId 1 perform tx's and switch to another network. They seem related to not keeping track of the nonce and a mixed up of subsequent problems.

I identify 3 user-facing problems, but might be more on the background.

First issue: a transaction is being Queued, but it is displayed together with the Confirmed transactions.

image

Second issue: there is no default nonce anymore, when I try to perform another transaction

image

Third issue: when I am trying to Speed up or Cancel that transaction, new transactions entries are being created, with empty name and data.

Screenshot from 2023-02-01 09-59-54

This is the video of the complete flow and all 3 problems. This ticket could be split up in 3 tasks, even though, the reporting ticket is 1, as it is hard to decouple the 3 behaviors (it happens one after the other, not isolated).

https://user-images.githubusercontent.com/54408225/215997514-7998ec2d-6527-431e-b8f6-7245bf01c630.mp4

Steps to reproduce

  1. On a terminal, open a ganache server with chanId 1 forking mainnet ganache --fork https://mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID --chain.chainId 1
  2. On MM, edit Localhost to point to chainId 1
  3. Change network to Localhost
  4. On Advanced settings, enable Nonce toggle
  5. Go to Test Dapp
  6. Connect MM
  7. Click Create Token
  8. Accept tx on MM --- see nonce is correct
  9. Tx is successful
  10. Click again Create Token
  11. Change the default nonce to a higher value
  12. Confirm tx
  13. Open MM -- see Issue 1: transaction has status Queued, but it's on the Confirmed list
  14. Now change to Goerli network
  15. Go to test Dapp
  16. Refresh
  17. Click Create Token -- see Issue 2: there is no default nonce anymore
  18. Click Confirm
  19. Open MM
  20. Speed Up or cancel the tx several times -- see Issue 3: new tx entries keep appearing with empty data

Error messages or log output

No response

Version

10.24.1

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

seaona avatar Feb 01 '23 09:02 seaona

Thanks for catching this, Mariona! I've added it to our next week's sprint board so we go over it during sprint planning.

bschorchit avatar Feb 06 '23 15:02 bschorchit

@danjm @pedronfigueiredo This could be the cause of the missing "transactionType" sentry errors that we couldn't understand 1-2 years ago

danjm avatar Feb 14 '23 16:02 danjm

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 Sep 03 '23 16:09 github-actions[bot]

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 Jan 07 '24 14:01 github-actions[bot]

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 19 '24 16:05 github-actions[bot]

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.

github-actions[bot] avatar Jul 03 '24 18:07 github-actions[bot]