MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
12.03k stars 4.91k forks source link

User reports not always broadcasting transactions #2973

Closed danfinlay closed 6 years ago

danfinlay commented 6 years ago

From our gitter, @nikita-fuchs reports that one of his colleagues' metamask installations is failing to broadcast transactions to either Mainnet or testrpc.

From there:

since yesterday, one of my colleague's account's transactions are not being broadcasted at all. the TX of another account are being broadcasted very slowly, >10 minutes and sometimes more. as far as i know, metamask uses infura, and when sending a web3.eth.sendRawTransaction, the callback takes around 10 minutes or more. the other issue is, that even when pointing metamask to a locally running testrpc/ganache, it was not broadcasting the transaction to it at all. the console said it was being waited for (because remix IDE of course wanted the transaction details and constantly did web3.eth.getTransactionReceipt), but that never succeeded, because scrolling further to the top, there was no transaction sent out at all.

Opening this issue to dig into possible causes.

danfinlay commented 6 years ago

I would be curious to watch the background network activity when sending a transaction to testrpc. Is one never sent? Is an error returned? http://metamask.helpscoutdocs.com/article/21-how-to-get-logs-and-help-metamask-support-and-diagnose-your-issue

maxweng commented 6 years ago

I'm now experiencing the same issue. I checked the background activity, and there's nothing sent to the testrpc after click the confirm button. But on UI, it said the transaction is approved.

maxweng commented 6 years ago

My bad, it looks like the transaction is sent, and the following eth_getBlockByNumber request got the following response. {"id":6525790472361624,"jsonrpc":"2.0","result":{"number":"0x3","hash":"0x9bb36fb46a1709370f038a771f7f6663efeec95e8818bee904abd587797559e2","parentHash":"0x411b0a854e5f7f99c214a284032abac4cc9e3470b43fb7f5b4dde908c18fd0e9","mixHash":"0x1010101010101010101010101010101010101010101010101010101010101010","nonce":"0x0000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","stateRoot":"0x7b6c3cba483245b01e5f4e4effb5e7120dc4d108613a0fb6d052ebb408e0a71d","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","miner":"0x0000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x00","size":"0x03e8","gasLimit":"0x6691b7","gasUsed":"0x0f8201","timestamp":"0x5ad88128","transactions":["0x765ee761faeaa73571e7a5927208ef03d91de3d9c95de32a393a7cfa85c21537"],"uncles":[]}}

But the testrpc doesn't show 'transaction mined' message. So looks like the transaction failed.

danfinlay commented 6 years ago

That response is just a normal block request, we poll for that constantly in the background, it's not really related to the transaction unless it was mined in that block.

danfinlay commented 6 years ago

I believe this is fixed by #4557, and will be fixed in our next release (should be very soon!)