How to Debug Metamask Errors? (Developer Edition)
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
- Step 1: Before the Dapp is loaded into the browser, the user needs to select the account in Metamask.
- Step 2: Front-end of the Dapp is loaded in browser & metamask is injected in the webpage; and javascript code starts to execute.
- Step 3: Metamask prompts the user to allow Dapp to access its address.
- Step 4: Rest of Javascript code of Dapp is loaded when the setup of various event handlers attached to forms is completed.
- Step 5: User click on send button to send transaction; Metamask prompts the user for confirmation and transaction is sent to Ethereum network.