Metamask-extension: Error: Transaction nonce is too low

Created on 24 Jul 2017  路  11Comments  路  Source: MetaMask/metamask-extension

Since our last version release, v3.9.1, I've gotten a couple reports of Transaction nonce is too low errors.

Our former trick of resetting the provider by switching the network to another and back again does not help people in this state.

Reported most recently by @gm9 in our slack, who I've asked for some UI state logs that could help in the investigation.

In the meanwhile, let this issue represent a bug in the nonce tracker that results in nonces being set incorrectly low.

L04-backencore P1-asap T00-bug

Most helpful comment

  • we merged in fixes for [1] (most likely related to insufficient balance on resubmit)
  • we added some really verbose history logging to generally help diagnose [2] and gm9's issue and maybe even @libreoscar's compact and emotionally charged contribution to this ticket ":confused:"

we'll publish these today with some other fixes and try to get more insight into these bizarre nonce failures

All 11 comments

Is anyone else out there experiencing this as well? maybe @libreoscar?
if so you may be able to help us diagnose the issue.
please provide your ui state logs https://github.com/MetaMask/faq/blob/master/LOGS.md#ui-state-logs-chrome (this log contains your ethereum addresses, feel free to DM this on slack/twitter/gitter)

thanks

was just able to reproduce locally

Slack user @gm9 got back to me and provided some logs, the failed transactions had no nonce set.

Here is my state log
metamasklog.json.zip

@flyswatter nonce was missing from params for gm9? hmmm - thats what i was seeing before pulling latest - maybe we're not handling an error while getting the nonceLock

that is different from @dyzz's issue(s) some observations:

1) log shows a few txs with "cb is not a function" as the error
2) later (after restart? update?) its encountering a "nonce too low" error when using a nonce that already succeeded - not sure how you could encounter that
3) i see the latest transactions from this address not in the logState tx history, but made before @dyzz published this log (@dyzz are you using a different device/wallet?)

@kumavis I tried to switch between different networks, and I did send a transaction from my cell phone.

  • we merged in fixes for [1] (most likely related to insufficient balance on resubmit)
  • we added some really verbose history logging to generally help diagnose [2] and gm9's issue and maybe even @libreoscar's compact and emotionally charged contribution to this ticket ":confused:"

we'll publish these today with some other fixes and try to get more insight into these bizarre nonce failures

@kumavis it seems that result from 'eth_getTransactionCount' of ropsten on infura is somehow wrong.
e.g.

https://ropsten.etherscan.io/address/0xd37448ad7949c4ad8eba5aad1a0afdd3199971d8

expected nonce: 2

actual:

https://ropsten.infura.io/metamask

curl -X POST \
  https://ropsten.infura.io/metamask \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getTransactionCount", "params": [
   "0xd37448ad7949c4ad8eba5aad1a0afdd3199971d8","latest"
]}'
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0"
}



md5-477a3b38f22fa9d1033fbdf9192aed0c



{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x4c"
}

Thanks for the report @dyzz, EG From INFURA here. We're able to reproduce and are looking into it. Ill send an update shortly.

Hi @dyzz after looking into it further, the numbers returned by Infura are correct. It looks like you are comparing the transactionCount number to etherscan's total transaction count number which includes both In and Out transactions. If you compare the number of outgoing transactions to the value returned by the Infura RPC, Infura and Etherscan's responses are identical. Let us know if we can help further debug this issue.

we've made some significant improvements here - folding this into #1127

Was this page helpful?
0 / 5 - 0 ratings