Skip to main content

MetaMask nonce error in the dev environment

Cause: Every time the dev environment starts, it creates a new local test chain. MetaMask caches the latest block number and the account transaction nonce. Because each dev run creates a fresh chain, the cached values no longer match the new chain state, causing transactions to fail. Solution: Clear the MetaMask account activity cache by following the MetaMask documentation.

MetaMask nonce error when using --reset-on-change

Cause: The --reset-on-change option resets the blockchain on every code change. After a reset, the block number and account nonce return to their initial values, but MetaMask does not clear its cache automatically. Solution: Clear the MetaMask account activity cache by following the MetaMask documentation.

Error: could not coalesce error (error={ "code": -32603, "message": "Internal JSON-RPC error." })

Cause: Stale wallet cache state after a chain reset or restart. Solution: Clear the MetaMask account activity cache by following the MetaMask documentation.