RPC Error - Nonce Too High

Hello, I am developing an NFT marketplace and have been running into the same error when trying to create an NFT. I receive this error:

MetaMask - RPC Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":-32000,"message":"Nonce too high. Expected nonce to be 0 but got 2. Note that transactions can't be queued when automining.","data":{"message":"Nonce too high. Expected nonce to be 0 but got 2. Note that transactions can't be queued when automining."}}}}'

I have tried resetting the account, using custom nonce, using different accounts as well without any luck. If anyone has any other suggestions, please let me know.

1 Like

Hello @kaep93 !
Welcome to the MetaMask community !
In which network are you developing the NFT marketplace? Perhaps the error is related to the test network, which is no longer relevant, for example Ropsten

3 Likes

Hello!
I am only in testing mode for Localhost 8545. I access it through h-ttp://localhost:3000. My settings for that network is set as follows:
Network name: Localhost 8545
New RPC URL: h-ttp://localhost:8545
Chain ID: 1337
Currency symbol: ETH
**please ignore the - symbol in my http links, it wouldn’t allow me to post otherwise

Based on the Chain ID, I understood that you are working on the private Ganache blockchain.
What version of Truffle are you using? You can see it in package.json
( The current version is 5.6.7 ).
After what account transaction from one address do you get an error?

3 Likes

Well, I plan to move onto Polygon Mumbai. I got the 1337 chain from a hardhat documentation. But based on this Network Endpoints documentation, should it be the Goerli network that I connect to instead? I haven’t deployed to test yet though.
h-ttps://wiki.polygon.technology/docs/develop/network-details/endpoints/

I am using Hardhat (version 2.12.0).

Also, when I try to change the chainId to 137 in the settings, it brings up the warning ‘Could not fetch chain ID. Is your RPC URL correct?’ and doesn’t let me save it for the Localhost:8545 network.

**please ignore the - symbol in my http links, it wouldn’t allow me to post otherwise

Update:
I have successfully changed the chainID to 31337 in my hardhat.config.js and in MetaMask network settings for Localhost:8545. This is in accordance the Hardhat documentation: h-ttps://hardhat.org/hardhat-network/docs/reference

In my activity, it shows a Create Token as successful and Create Market Item as successful as well. But I still got an error of Img src about the width and height properties that have been set already. My question is how I get the activity of Create Token as successful and Create Market Item as successful on MetaMask when that Img src error still shows up?

**please ignore the - symbol in my http links, it wouldn’t allow me to post the links otherwise

@kaep93 ,

Digging around on Stack Exchange, would something like this help?

Thank you but I still am struggling with that same error popping up after supposedly having successfully created the token and market item. I don’t really know why it’s being created but not showing up.

@kaep93
Never used this tool.
I always use Truffle for these purposes.
Truffle offers many features for easier and efficient development of dApps such as contract compilation and management support, an interactive console for facilitating direct contract communication, and network management.

4 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.