How to Fix the 'Cannot Fetch Chain ID' Error When Adding BSC to MetaMask

·

MetaMask is a widely used cryptocurrency wallet that allows users to interact with various blockchain networks. One of the most popular networks to add is the Binance Smart Chain (BSC), which offers lower transaction fees and a thriving ecosystem of decentralized applications. However, users often encounter a common error during the setup process: "Cannot fetch chain ID. Is your RPC URL correct?"

This error can be frustrating, but it's usually easy to resolve. In this guide, we will walk you through the steps to successfully add the Binance Smart Chain to your MetaMask wallet and troubleshoot the "Cannot fetch chain ID" error.

Understanding the Binance Smart Chain and MetaMask

The Binance Smart Chain is a blockchain network built for running smart contract-based applications. It is compatible with the Ethereum Virtual Machine (EVM), which means that tools like MetaMask can easily interact with it. To use BSC with MetaMask, you need to manually add the network by specifying its RPC (Remote Procedure Call) details.

These details include:

If any of these details are entered incorrectly, MetaMask will be unable to connect to the network, resulting in the "Cannot fetch chain ID" error.

Correct RPC Settings for Binance Smart Chain

Using outdated or incorrect RPC settings is the most common cause of this error. Ensure you are using the most current and reliable RPC URL. Here are the official and recommended settings for adding the Binance Smart Chain Mainnet to MetaMask:

Double-check each entry for typos. A single misplaced character or an extra space can prevent a successful connection.

Step-by-Step Guide to Adding BSC to MetaMask

Follow these detailed steps to add the network correctly:

  1. Open Your MetaMask Wallet: Click on the MetaMask extension icon in your browser to open the wallet interface.
  2. Access Network Settings: Click on the network selection dropdown at the top of the window (it usually says "Ethereum Mainnet"), then scroll down and select "Add network."
  3. Manually Enter Network Details: In the form that appears, carefully input the correct settings from the list above into the corresponding fields.
  4. Save and Switch: Click "Save." MetaMask will now attempt to connect to the Binance Smart Chain using the details you provided. If all information is correct, it will switch to the new network automatically.

Troubleshooting the 'Cannot Fetch Chain ID' Error

If you still encounter the error after entering the correct settings, try these troubleshooting steps:

For a comprehensive list of reliable RPC endpoints and network status updates, it's always a good practice to 👉 consult the latest network resources.

Frequently Asked Questions

Why does MetaMask show 'Cannot fetch chain ID'?
This error occurs when MetaMask cannot communicate with the blockchain node using the RPC URL you provided. The cause is typically an incorrect RPC URL, a typo in the Chain ID, or a temporary issue with the RPC provider.

What is the correct Chain ID for Binance Smart Chain?
The correct Chain ID for the Binance Smart Chain mainnet is 56. Using any other number, such as 97 (which is the testnet Chain ID), will result in an error.

Is it safe to use public RPC URLs?
Using official and well-known public RPC URLs, like those provided by Binance, is generally safe for connecting your wallet to the network. However, for frequent transactions or larger holdings, consider using a reliable private RPC service for better performance and reliability.

What should I do if none of the RPC URLs work?
If you have tried all alternative RPC URLs and the error persists, the issue might be on your end. Double-check your internet connection, try restarting your browser, or even reinstalling the MetaMask extension (ensure you have your Secret Recovery Phrase backed up first!).

Can I use the same settings for the BSC Testnet?
No, the testnet requires different settings. For the BSC Testnet, use the following: Network Name: BSC Testnet, New RPC URL: https://data-seed-prebsc-1-s1.binance.org:8545/, Chain ID: 97, Currency Symbol: BNB, Block Explorer URL: https://testnet.bscscan.com.

Will adding a new network risk my funds?
Adding a read-only network like BSC to MetaMask does not by itself risk your funds. However, you should always ensure you are using the correct settings from official sources to avoid connecting to a malicious network designed to phish your information.