MetaMask - RPC Error:

hallo

In my project, I tried to connect with metamask on Ganache. But I got the error like the following.

``` {code: -32602, message: "Expected an array with at least one valid string H…url 'rpcUrls', Received:\nhttp://3.0.96.112:100002/", stack: '{\n "code": -32602,\n "message": "Expected an arra…gaeaoehlefnkodbefgpgknn/background-3.js:10:55314)'} ```

After querying, I believe that the rpc address should be in array format, but I have already done so,

``` rpcUrls: ['http://3.0.96.112:10002/'], ``` Please let me know how can fix it.
1 Like

Hey @wuyue, welcome to the MetaMask community! :fox_face:

You may be better off contacting Truffle support at https://trufflesuite.zendesk.com/hc/en-us/requests/new

2 Likes

Ganache is private blockchain.
You are the validator node in it.
Try specifying localhost in your connection configuration:


module.exports = {
  contracts_build_directory: "./mydir/contracts",
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      network_id: "*"
    }
  },
  compilers: {
    solc: {
      version: "version" //  current actual version compiler 
    }
  }
};

666666

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.