Version 1.0 (commit hash = c154988 )
Many of the examples given in documentation don't work and give this error. here's an example. The response id keeps increasing.
Os: mac os x
Browser: latest Chrome
web3.eth.accounts.signTransaction({
to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
value: '1000000000',
gas: 2000000
}, '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318')
.then(console.log);
i {_bitField: 0, _fulfillmentHandler0: undefined, _rejectionHandler0: undefined, _promise0: undefined, _receiver0: undefined鈥
web3-1.0.min.js:1 Unhandled rejection Error: Wrong response id "25" (expected: "3823692783358944") in {"jsonrpc":"2.0","id":3823692783358944,"method":"net_version","params":[]}
at http://localhost/stateChannel/js/web3-1.0.min.js:1:431701
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:168:7
at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/scripts/inpage.js:8222:5
From previous event:
at i.d [as _captureStackTrace] (http://localhost/stateChannel/js/web3-1.0.min.js:1:362390)
at i._resolveFromExecutor (http://localhost/stateChannel/js/web3-1.0.min.js:1:395366)
at new i (http://localhost/stateChannel/js/web3-1.0.min.js:1:387897)
at e.exports (http://localhost/stateChannel/js/web3-1.0.min.js:1:429178)
at s.i [as getId] (http://localhost/stateChannel/js/web3-1.0.min.js:1:350837)
at m.signTransaction (http://localhost/stateChannel/js/web3-1.0.min.js:1:657911)
at <anonymous>:1:19
I cannot reproduce this. To which node are you connecting?
Works for me:

Using metamask - rinkeby testnet (which i think is infura)
I did not compile by the way. Using precompiled web3.min.js in the repo. @frozeman
Edit: compiled myself and used web3.js getting same error.
@kumavis are you altering the response IDs in any way?
@frozeman No. I dont really know what these are.. can you explain?
Every JSON rpc request contains a id which needs to come back with the same ID, so the calling library can match requests and responses. It looks like meta mask is changing the returning ID. (i guess at least)
+1
@hrishikeshio Did you fix this problem ? I have the same issue and I am stuck
@frozeman i got the same error while upgrading from metamask own web3 to one included by me to fix some deprecation warnings. maybe we have to reset some data somewhere in order to make the nonces restart from 1?
any news about this?
I was currently on holidays. The person who could help with that the best would be @kumavis
coming from #981 since it was closed. some of us have been seeing this error:
MetamaskInpageProvider - sendAsync not overwritten
it seems the problem lies within
this.web3.eth.getAccounts
the majority of the time, this function never returns a callback, and when it does, it always causes the Async error. Is this a web3 1.0 issue?
apologies for my formatting, I'm a noob at commenting :(
it seems to be fixed, have a look at https://github.com/MetaMask/metamask-extension/issues/1940
Please drop a comment if this isn't solved.
I encountered this problem suddenly. But I could run the code before.(I didn't change them). So I thought it might be a tempory bug in metaMask and then I just logged out the metamask account and logged in again. It turned right. May be it's helpful for you.
I still encounter this error. Switching accounts in metamask fixes the issue but do we have another fix or workaround for this? It's terrible UX to ask users to do this for a dapp to work.