I was following a tutorial but found out that it is outdated. Inputting 'truffle develop' in bash states that it started on "" However, when I try to connect Truffle and Metamask, I get this error, "Could not fetch chain ID. Is your RPC URL correct?"

I tried configuring truffle-config.js with the code below but I still get the error.

  networks: {
     development: {
      host: "",     // Localhost (default: none)
      port: 9545,            // Standard Ethereum port (default: none)
      network_id: "*",       // Any network (default: none)

Metamask Chain ID error

3 Answers 3


You have to install some old version of metamask. Donwload direclty from their github. In my case, I was able to connect once installed v 5.0.0.

Just to save people time, here is the Github link to Metamask v 5.0.0: https://github.com/MetaMask/metamask-extension/releases/tag/v5.0.0

To install the zip file on chrome

  1. Download the zip file and unzip it

  2. Go to "chrome://extensions" on chrome

  3. Check the "Developer mode" box

  4. Click "Load unpacked extension..."

  5. Open the folder that we unzipped in step 1

Hope it helps...


Remember to add the trailing forward slash (/) to the RPC URL and for the Chain ID use any digit, I used 99 and network name should be Custom RPC


First, check port 9545 is up in your OS by netstat -ntlp. if it does not show anything about 9545, please check the first line of logs in the starting truffle develop command. maybe it uses another port for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.