Closed gcobr closed 1 year ago
Hi thanks for raising this issue!
The issue is potentially caused by the --server.host
parameter which defaults to 127.0.0.1
.
Can you please try by starting Ganache with the following:
ganache --port=8544 --miner.blockTime=10 --server.host=0.0.0.0 --detach
In addition, you can try connecting to Ganache directly (cutting out Metamask), by executing the following from your local computer:
curl -s http://my.custom.server.domain:8544 -X POST -H "Content-Type:application/json;" -d '{"id":1,"jsonrpc":"2.0","method":"eth_accounts"}'
I am prototyping a DApp, and I would not like to use any of the Ethereum test networks with it for now. Instead, I would like to run a fake blockchain using Ganache on a remote server and connect MetaMask from the user's browser to it.
If I run it in detached mode using something like this
on a remote server, should I be able to connect MetaMask to it as a custom network using an endpoint like http://my.custom.server.domain:8544?
Assume the firewall (which in this case is an AWS security group on the corresponding EC2 instance) allows traffic on port 8544. Is there any other port I would have to open?
I ran a few experiments with the set up above, but it seems that MetaMask can never see the fake ETH balance that the test accounts would have. MetaMask always shows a balance of 0 ETH for all accounts.
Also, any tips for debugging this? Anything in particular I'd have to check in logs?