I am trying to follow the truffle pet shop tutorial. But failed to connect metamask with ganache-cli I ran ganache-cli in the console and changed the rpc url to http://127.0.0.1:8545 But the addresses are still not loading and neither the balance is going up.
What i did is go to custom rpc and paste ganache url i.e http://127.0.0.1:7545 to new rpc url and then save it.... worked for me try it out.
This is just a miner issue I guess. Check the Port of GANACHE running in your PC. METAMASK connects with the port number 8545. And if your GANACHE is not running in that PORT, you'll face the issue. (sometimes ganache runs on 7545 instead of 8545) This issue can be solved either changing the port number in the server configuration of your GANACHE setup. OR through changing the network from localhost at 8545 to custom rpc and by adding http://127.0.0.1:7545 as URL.