Metamask is the go-to crypto wallet of choice for most crypto enthusiasts – newbies and experienced users alike. The wallet is a non-custodial wallet that allows users to store and manage their crypto assets securely regardless of the device since it is available on PC as a browser extension and on mobile as a feature-packed mobile app on Android and iOS smartphones.
As with most software, there are bound to be a few bugs and errors which users may encounter occasionally in their day-to-day use and the Metamask wallet is no different.
Although Metamask is an open-source decentralized wallet that goes through so much testing and re-testing before any version of the software is released to the public, there may be some bugs and errors that sip through these rigorous testing processes.
One of the most common errors we have seen many Metamask users report on various online forums is the internal JSON-RPC error. It is a quite confusing and frustrating error, especially for users who use Metamask as their first-choice wallet for crypto management.
In this article, we will take a look at the Metamask internal JSON-RPC error extensively including some of the probable causes and multiple methods you can use to fix the error on your Metamask wallet.
What Is JSON-RPC?
JSON which is an abbreviation for Javascript Object Annotation is a simple and lightweight data format that is used by computers to transmit data payloads between a server and a web app or mobile app.
RPC, on the other hand, is an abbreviation for Remote Procedure Call and it is a protocol that is used by computer networks to call a function on another computer or server remotely which then returns the result of the function to the calling program.
JSON-RPC combines the power of both JSON and RPC technology. It is a protocol used for remote procedure calls between two computer programs on a network.
The protocol works by sending a message via RPC and then receiving a result from the function called in the form of a JSON result. The returned JSON result can either be a response message or an error message if the request could not be completed.
On crypto wallets like Metamask, JSON-RPC is used for efficient communication between your wallet and the DApps your wallet is connected to. In other cases, Metamask uses the JSON-RPC protocol to interact with the blockchain networks you have added to your wallet.
What Are The Causes Of Internal JSON-RPC Error On Metamask?
Now that we understand what the JSON-RPC protocol is, let’s take a look at some of the causes of the JSON-RPC error on Metamask.
There are quite a number of reasons why you might be seeing the internal JSON-RPC error on your Metamask wallet and we will outline some of these reasons below.
If you’re seeing this error on your Metamask wallet when trying to use a network, then you may have not added the network to your Metamask wallet correctly. It may be that you put in the wrong RPC-URL or chain ID when adding the network to your Metamask wallet.
Another reason why you might be facing the JSON-RPC error on your Metamask wallet is that you may not have enough tokens to settle the gas fees for your transaction.
Also, if you use an outdated version of the Metamask browser extension or mobile app, then you may face a JSON-RPC error and this may not be your fault directly because the Metamask devs may change some RPC information in the source code of the software from time to time.
Some other things that may cause the error include blockchain network congestion, firewall or security issues, and browser issues amongst others.
How To Fix The Internal JSON-RPC Error On Metamask (Multiple Fixes)
Since there are quite a number of reasons why you might be seeing any of the JSON-RPC error codes on your Metamask wallet, there is no single method to fix the error. The method you will use to fix the issue on your wallet will depend on the root cause of the error.
Below we have outlined some fixes you can try to get rid of the internal JSON-RPC error on your Metamask wallet.
1) Ensure you have added all the networks on your wallet correctly.
One of the major causes of the internal JSON-RPC error on Metamask adding networks incorrectly. If you have added the network to be used for a transaction to your Metamask wallet wrongly, then it is almost certain that will be faced with an RPC error when you try to execute the transaction.
To prevent this issue, we recommend copying the details of any network you’re adding to your wallet carefully to avoid errors or better still, you opt to add networks to your Metamask wallet automatically via ChainList to avoid issues.
If you’re seeing an RPC error when you try to execute a transaction on a particular network on Metamask, try removing the network from your wallet first then carefully re-add the network to Metamask manually or automatically via ChainList.
If the transaction you’re trying to execute is on Ethereum, then you can try other methods below since the Ethereum Mainnet is configured by default on your wallet and you cannot remove or re-add the network.
2) Ensure you have enough tokens to cover gas fees.
Another reason why you might be getting the internal JSON-RPC error while trying to execute a transaction on Metamask is that you may not have enough native tokens to cover the gas fees associated with the transaction.
If you’re trying to execute any transaction on any network on your Metamask wallet, you need to have enough native tokens of the said network (e.g ETH for the Ethereum network and BNB for the BNB Chain) to cover the gas fees. If the tokens on your wallet are not enough to cover the transaction’s gas fees, you will be greeted with an error on your wallet.
To fix this, simply send additional native tokens of the network you’re making a transaction on to your Metamask wallet and try to execute the transaction again.
3) Update the Metamask extension (or mobile app)
If you have enough native tokens to pay for the gas fees associated with your transaction and all networks on your wallet were added correctly, then another method you should consider to fix the JSON-RPC error on Metamask is to simply update the Metamask extension or mobile app.
To update the Metamask browser extension on Chrome and other Chromiium-based browsers, simply go to the Metamask extension page on the Chrome web store and if you see a button that says “Remove from Chrome“, then Metamask is up to date to date, else you can simply update the extension from there.
On updating the Metamask mobile app, simply visit the Metamask app page on the App Store or the Google Play Store depending on your device, and click the Update button to update the app.
4) Update your web browser.
In some cases, using an outdated browser can cause many errors when you try to use Metamask so another fix to try out if you’re trying to fix the internal JSON-RPC error is to check if your browser is up to date and update it to the latest version if it is outdated.
There are many ways to update your web browser on a desktop depending on your operating system. On Linux systems, you can simply update your browser via the terminal or any package manager of your choice.
On Windows and Mac systems, you can update your browser (Chrome in this case) by clicking Help > About Google Chrome, then wait for the update check process to complete. Allow Chrome to download the update and when it’s done, click [Relaunch] to install the update and relaunch the browser.
5) Reconnect your hardware wallet.
Another issue we have seen causing the internal JSON-RPC error on Metamask is if your hardware wallet is not connected to your Metamask wallet correctly. Metamask uses the JSON-RPC protocol to communicate with hardware wallets connected to your wallet.
If you use a Ledger hardware wallet, then we recommend enabling Ledger Live support first. To enable Ledger Live on your Metamask wallet, navigate to Settings > Advanced then toggle Use Ledger Live on. If you use another hardware wallet, you can skip this.
To reconnect your hardware wallet, plug in the device to your computer then go to Metamask, click the circular account icon and select [Connect hardware wallet] then select your wallet manufacturer from the list then follow the prompt to connect your hardware wallet to Metamask.
Wrapping Up
The Internal JSON-RPC error can be a very challenging issue to encounter while using the Metamask wallet either on desktop or mobile, especially for users who are new to the wallet.
Thankfully, there are a handful of solutions available which can be used to fix the error on your wallet.
Some of these solutions include ensuring that networks are added correctly to your wallet, adding more native tokens to your wallet to cover gas fees, updating the Metamask extension or mobile app, updating your browser, and reconnecting your hardware wallet (if you use Metamask with a hardware wallet).
Every one of these solutions have be discussed in detail in the article and if none of the solutions fixed the error on your end, then we recommend reaching out to the Metamask support team and they’ll take a deeper look at the problem and come up with a fix for you as soon as they can.
Remember never to share your Metamask Recovery Phrase with any one while seeking help to ensure your wallet and the funds on it are safe.