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

sendTransaction: unhandled promise rejection #2500

Closed
dukei opened this issue Mar 14, 2019 · 2 comments · Fixed by #2510
Closed

sendTransaction: unhandled promise rejection #2500

dukei opened this issue Mar 14, 2019 · 2 comments · Fixed by #2510
Labels
Bug Addressing a bug

Comments

@dukei
Copy link

dukei commented Mar 14, 2019

Description

sendTransaction does not handle promise rejection sometimes and it leads to compete calling application freeze.

Expected behavior

Any error inside sendTransaction should be propagated to the caller.

Actual behavior

https://github.com/ethereum/web3.js/blob/5023c450a783b892da862712e0d8dc26cddba4ab/packages/web3-core-method/src/methods/transaction/SendTransactionMethod.js#L80

The above line does not handle promise rejection that leads to complete freeze of application calling sendTransaction. The promise can be rejected in case of connection failure, for example.

Steps to reproduce the behavior

  1. Set any provider that is shut down (you can even point it to inexistent url)
  2. Try to call web3.eth.sendTransaction(...)

Error Logs

Unhandled promise rejection.... and stuff

Versions

  • web3.js: 1.0.0-beta.48
  • nodejs: any
  • browser: n/a
  • ethereum node: n/a
@nivida
Copy link
Contributor

nivida commented Mar 14, 2019

Thanks for creating this issue! This will get fixed on the next release.

Could you update your issue to be aligned with the issue template we provide?

@nivida nivida added the Bug Addressing a bug label Mar 14, 2019
@dukei
Copy link
Author

dukei commented Mar 14, 2019

Issue updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Addressing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants