-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private blockchain (i.e. Truffle develop/Ganache) gets out of sync with MetaMask #4361
Comments
This workaround was made for just this problem: A longer term solution will require special communication between MetaMask and Ganache, which we hope to do eventually, but is unfortunately lower priority at the moment. |
I'd like to reopen this issue, as I'm still seeing this issue (both on Chrome and Firefox) with the latest version (Metamask 4.8.0) on Ubuntu 16.04 . Ganache version is 1.2.0. I've tried the following steps, but to no use.
Though related, the unique problem is that my nonce in my local Ganache network is 8, after deploying my contracts. However, Metamask is not picking up the network transaction activity and is still solidly at 0. Hence I'm getting a nonce error (Metamask nonce: 0, Tx nonce: 8). Please see attached snapshots. Error: Error: Error: Error: [ethjs-rpc] rpc error with payload {"id":1424189557055,"jsonrpc":"2.0","params":["0xf8ec088501dcd65000834c4b409426081ddc1956a6fa8ac0d624759bed658d01f87480b884946be2610000000000000000000000008f756250f09c8bc2113705e7e1ca0c8b9a332e0e0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000d57696c6c79204865726d616e6e00000000000000000000000000000000000000822d45a09dd75acb1d07c3786be9eec47ea3d5eba0fee22cf19ebbce559593d41fcee39ba073578003f07988b66db1b790e2a9702f36d8ed0c20bdabe9eba60f78a125a0c3"],"method":"eth_sendRawTransaction"} Error: the tx doesn't have the correct nonce. account has nonce of: 0 tx has nonce of: 8 Please let me know asap if I should open up a new issue or whether you will reopen this issue. |
Ok... Did some troubleshooting. When I run Ganache 1.2.0 (and 1.2.1 which had some bug fixes), I faced this error of nonce mismatch when I try to do a transaction with Metamask. I will report this error on the Ganache issue list now. |
I am developing a dapp and testing with Metamask. Often through my development process, my Metamask gets out of sync with the blockchain, resulting in nonce errors. The workaround is to uninstall and reinstall Metamask, then re-import accounts, which is very time-consuming.
My reproduction steps for the issue are as follows:
truffle develop
).migrate --reset
(this preserves the contract deployment addresses).I understand this is not behavior which will happen on a production blockchain, however, I rely on Metamask for development and it would be great to have a way to reset the account back to the initial state.
The text was updated successfully, but these errors were encountered: