question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nonce values stuck too low when using Nonce Tracker

See original GitHub issue

We’ve noticed that sometimes a getTransactionCount hitting an INFURA node can return a value that is invalid when used as a nonce in a transaction.

{"code":-32010,"message":"Transaction nonce is too low. Try incrementing the nonce."}

When the Provider Engine Nonce tracker is used, one can end up in a loop of invalid nonces as the value from getTransactionCount is now cached. The nonce is never cleared from an error during sendTransaction, even if the nonce is the reason the sendTransaction failed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
roderikcommented, Jan 31, 2018

I believe this might be a specific issue with Parity PoA and/or short blocktime setups and not Infura. We are running into the same issues on a permissioned setup that looks a lot like Kovan.

0reactions
danfinlaycommented, Apr 16, 2018

I’m not sure our new nonce logic could live in provider-engine by itself: It depends on having a list of sent/pending transactions, so it can increment over the highest nonce between that and the network’s latest confirmed tx for that account.

I think nonce tracking with provider-engine is probably going to continue to be inadequate for as long as it doesn’t also track sent/pending transactions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

getting error nonce too low , but nonce is proper stuck since ...
I am working with web3.js since sometime now , but now i am stuck with nonce too low error , the nonce is...
Read more >
How do I customize the nonce value, gas price and gas limit ...
Step 2: Go to the Explorer and look for the earliest pending transaction nonce value · Paste your ETH address in the search...
Read more >
How to Unstick Stuck Transactions in MetaMask - Medium
Open your MetaMask wallet, go to Settings, and then Advanced. Scroll down until you see the Customize transaction nonce option and turn it...
Read more >
Stuck transaction? Here's how to unstick it - ETH Gas Station
Find out how to fix a stuck transaction on the Ethereum network with ETH Gas Station's guide on how to speed up or...
Read more >
How to Fix Stuck Transactions on Ethereum - Boxmining
Another way is to use a new transaction to clear the old one by setting a custom nonce. For instance, a wallet might...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found