Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Transaction nonce is too low #1814

Closed
danfinlay opened this issue Jul 24, 2017 · 11 comments
Closed

Error: Transaction nonce is too low #1814

danfinlay opened this issue Jul 24, 2017 · 11 comments
Assignees
Labels
area-background Issues relating to the extension background process. type-bug

Comments

@danfinlay
Copy link
Contributor

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.

@kumavis
Copy link
Member

kumavis commented Jul 24, 2017

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

@kumavis
Copy link
Member

kumavis commented Jul 24, 2017

was just able to reproduce locally

@danfinlay
Copy link
Contributor Author

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

@dyzz
Copy link

dyzz commented Jul 25, 2017

Here is my state log
metamasklog.json.zip

@kumavis
Copy link
Member

kumavis commented Jul 25, 2017

@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?)

@dyzz
Copy link

dyzz commented Jul 25, 2017

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

@2-am-zzz 2-am-zzz added area-background Issues relating to the extension background process. P1-asap type-bug and removed area-background Issues relating to the extension background process. labels Jul 25, 2017
@kumavis
Copy link
Member

kumavis commented Jul 25, 2017

  • 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

@dyzz
Copy link

dyzz commented Jul 27, 2017

@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"
}

another example:

address: 0xE89BB07333b3D792C29c744511bbCFAEE0DdD4b7
expected nonce: 82
actual: 76

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

@egalano
Copy link

egalano commented Jul 27, 2017

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

@egalano
Copy link

egalano commented Jul 27, 2017

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.

@2-am-zzz 2-am-zzz added the ready label Aug 2, 2017
@kumavis
Copy link
Member

kumavis commented Aug 7, 2017

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

@kumavis kumavis closed this as completed Aug 7, 2017
@ghost ghost removed the ready label Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-background Issues relating to the extension background process. type-bug
Projects
None yet
Development

No branches or pull requests

6 participants