I receive an error when sending raw transactions. I get the following error message.

        Error: Returned error: Transaction nonce is too low. Try incrementing the nonce.

I get my nonce this way:

    const nonce = web3.eth.getTransactionCount(account);

I have double-checked and can guarantee that it returns the correct nonce.

Another thing I tried is to increment the nonce like the error message says but I still get the error.

Anyone has an idea why this is the case?

additional details network: Kovan

ethereum client: parity

error occurs after

  • 1
    Have you tried incrementing the nonce by one. const nonce = web3.eth.getTransactionCount(account) + 1; – Nico Vergauwen Oct 23 '18 at 21:49
  • Yes, I did. It still tells me the nonce is too low. – Sam Oct 23 '18 at 21:50
  • Are you running a program which is sending multiple transactions in a row? You will need to track the nonce on your side in these situations, since the network will be slow to update the latest transaction count until a new block is created. – Shawn Tabrizi Oct 23 '18 at 21:58
  • 1
    okay, I found the problem.... I was signing with the wrong key lol – Sam Oct 23 '18 at 22:11
  • if you decode your raw transaction , and compare to the nonce in the node that is in sync with Kovan network, do the nonces differ by +1 ? I mean, decode it by another process, not your code that is sending it. – Nulik Oct 24 '18 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.