Closed jgege closed 5 years ago
This bug affects all Ganache and ganache-cli users as well. Can you revert this change ASAP, @jonathansmirnoff and @frankiebee?
This whitelist strategy also means that ganache-cli won't work by default, since that uses the current timestamp as the network ID.
thanks for filing @jgege, we're taking a look
Issue is closed from the referenced PRs fixed by in Truffle. Truffle v5.0.7, but believe that v5.0.6 will also work. We could have also added the networkId on our end.
Please consider a solution other than a whitelist. A whitelist seems quite contrary to the spirit of decentralization, and I cannot guarantee that Truffle won't change network IDs in the future. The fix on our end to accommodate the problem here should not be considered an endorsement of this whitelist, but instead it is just meant as a stopgap solution.
Also, besides truffle develop
, there is still the problem of ganache-cli not working with MetaMask by default anymore, now that the whitelist is in place.
In addition to what @gnidan said, network ids in ganache-cli are based on the timestamp at startup by default. This issue is not fixed for ganache-cli
.
There's a issue open for ganache-cli
https://github.com/MetaMask/metamask-extension/issues/6214.
Ah, thanks @tmashuang.
Describe the bug Metamask shows "Not eth network" error when I try to send eth on a network created using "truffle develop". The "truffle develop" command creates a network with id 4447 by default but due to a check in metamask's utils.js this does not count as a valid network anymore. See the changes here:
https://github.com/MetaMask/metamask-extension/commit/8dddf48904323d47685516ccc76f9e267dbd188a#diff-955188925f3e95eb36c7ed4284fe5bfcR67
It does work if I set the network id to one on the white list (1, 3, 4, 42, 5777)
To Reproduce Steps to reproduce the behavior:
Expected behavior Should be able to use a custom network with Metamask.