How to Debug Metamask Errors? (Developer Edition)

Aliasgar Merchant
4 min readDec 8, 2020

Let’s accept it — Blockchain Developers (the cool solidity fans) have faced error from Metamask at some point or the other. Sometimes its easy to just reset the bad boy, but sometimes developers spend hours together debugging metamask.

In this article, I will talk about most common Metamask errors, how can you debug / solve them and how can you reset your entire slate (development environment) to have a fresh new canvas to work upon.

Metamask Lifecycle

Metamask lifecycle
  1. Step 1: Before the Dapp is loaded into the browser, the user needs to select the account in Metamask.
  2. Step 2: Front-end of the Dapp is loaded in browser & metamask is injected in the webpage; and javascript code starts to execute.
  3. Step 3: Metamask prompts the user to allow Dapp to access its address.
  4. Step 4: Rest of Javascript code of Dapp is loaded when the setup of various event handlers attached to forms is completed.
  5. Step 5: User click on send button to send transaction; Metamask prompts the user for confirmation and transaction is sent to Ethereum network.



Aliasgar Merchant

Novice astrophysicist in Cosmos. Building the next revolution of applications. I write about Blockchain related concepts.