Closed varvarasd closed 5 years ago
In my case, I found out it was caused by the chrome extension of MetaMask, which resulted in getting wrong network_id.
After I disabled the extension, the page works as expected.
Updated: We can set up Metamask with Truffle Develop (truffle 4 above) for local test. http://truffleframework.com/docs/advanced/truffle-with-metamask
Note that the app tries to connect to MetaMask and if it does not find a connection, it will create a connection to 127.0.0.1:9545 (line 24 of src/utils/getWeb3.js
). So your truffle.js
should look like this:
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
development: {
host: "localhost",
port: 9545,
network_id: "*",
gas: 4700000
}
}
};
Then when you run TestRPC it should be run as testrpc -p 9545
.
Hope that helps!
Also, you should have gotten a 12-word mnemonic after you run truffle develop
.
First, set up your MetaMask network as in the link @Squall949 posted, then click Logout.
Then, log back in with that 12-word mnemonic, and use whatever password you want. Now, you should be able to confirm the transaction with that test account.
This way you won't have to disable MetaMask. It'll work and you'll see 5.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if no there is no reply to further comments.
Tried everything above, uninstalled and reinstalled everything and 0 still doesn't change to 5
Maybe this has already been closed however:
Please note I've made no modifications. I've only followed the first 5 points in your Installation guide