-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Tx never resolves on ganache and no confirmation or receipt event triggered beta50-52 #2652
Comments
Thanks for referencing the other issue I have to close. Setting of the It was working before over an HTTP connection because the transaction confirmation workflow was not enough good. |
@nivida : I have the It works fine in earlier versions and I might be doing something incorrectly with the new but I can't figure out what. I tried to remove Do is it work for you? sendTx.js output (hangs forever):
Ganache output
EDIT: just tried with Ganache CLI v6.2.5 (ganache-core: 2.3.3), same issue |
@szerintedmi In my case, it's working fine both with Ganache and Geth so, you need to test at your end. It's not the problem with web3 v1.0.0-beta.52. |
thanks @princesinha19 ! |
I am using Linux (Ubuntu 18.04).
|
@princesinha19 : ah, that's a deploy not would you mind trying to run this (should work on fresh ganache)? UPDATE: neither deploy contract works: https://gist.github.com/szerintedmi/57e89261b67a4469626579427ffe1ec8 |
It broke somewhere in beta49, went back with versions one by one and my test script resolves with beta48 and but same issue with 49:
(although confirmations are not coming) |
@szerintedmi Upgrade to version 1.0.0-beta.52. |
@princesinha19 : I'm on beta52. Does the script I linked works for you? |
We tried to run it in different environments but same result. I reopened this issue with focusing only on the WebsocketProvider behaviour: #2661 |
I have this issue with the metamask provider. First of all the const web3 = new Web3(myProvider, undefined, {
transactionConfirmationBlocks: 1,
}) I can hardly imagine that this behaviour is intentional. Reverse engineering this is like a bad acid trip. |
I also suspect that this causes another issue: Parallel transactions do not work any more. Before a "send transaction" would immediatly resolve with a receipt and the local nonce would be increased. Now the "send transaction" will only resolve after at least 1 confirmation. If one attempts to send another transaction before the last one has been confirmed (and as such the promise has been resolved and the local nonce cache updated) one will send another transaction with the same nonce which will be rejected. |
Same here I just didn't want to convolute #2661 more. If I call |
@levino , maybe setting |
Description
A tx never resolves on ganache.
sendTransaction
,sendSignedTransaction
andconfirmation
events are NOT triggered.Only
transactionHash
event is triggered.It seems the web3 tx is somehow blocking ganache's automatic mining. It works in beta36 (our current version): ganache is mining blocks and confirmations are received.
NB: I tried to call evm_mine manually from
confirmation
event or even beforeawait tx
but it is not executed just when the tx times outExpected behavior
This should work on ganache as per documentation:
Actual behavior
receipt
orconfirmation
event calledSteps to reproduce the behavior
https://github.com/Augmint/web3js_integration_tests/blob/master/test/sendTransaction.js
https://github.com/Augmint/web3js_integration_tests/blob/master/test/signTransaction.js
https://github.com/Augmint/web3js_integration_tests/blob/master/test/fails.js
Error Logs
N/A
Gists
Barebone gist to demonstrate the issue:
sendTx.js
Versions
The text was updated successfully, but these errors were encountered: