Published on

How to Reset Dev Accounts in MetaMask

Authors

While deving a dApp you will inevitably make plenty changes. When using this with Ganache and MetaMask the chain and MetaMask will eventually end up out of sync. Some of the errors you may get in this situation are:

  • Error: the tx doesn't have the correct nonce. account has nonce of: 0 tx has nonce of: 2
  • Contract YourContract not found on network ID: 5777
  • Error: Unknown block number

Hint-that-the-error-will-happen

An-Example-Of-An-Error

Luckily fixing this is fairly easy by resetting these test accounts in MetaMask as follows:

  • Click the little account circle

Step-1-Account-Settings

  • Click Advanced and then the Reset Account button

Step-2-Advanced-Settings-And-Reset-Account

  • In the dialogue that pops up click Reset

Step-3-Confirm-Reset

The accounts should now be reset and whatever contract methods you were testing earlier should now work.