-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Bug: Truffle fails ungracefully when web3 throws due to an invalid provider. #1724
Comments
Users experiencing this problem or other invalid provider issues should pin their web3 dependency to web3/web3.js#2266, which was introduced in To confirm this was the cause of the issue, we asked @dan-turner to pin his web3 dependency to There's an outside chance that this was actually caused by other truffle breaking bugs that were present in |
Closing this issue, as it's redundant to the one over on the web3 issue tracker. |
Actually, it's a bug that the error from web3/web3.js#2266 didn't bubble up to the user in any form. Reopening this case (and lightly editing the description) so we can action that change. |
Is this still an issue? We can improve the error handling here to notify unsupported web3 versions. Thanks! |
I believe this got solved a while back with this. Thanks for suggesting this kind of thing! |
Note: this issue description has been edited from its original content by @benjamincburns to capture our current understanding of the problem:
Issue
Specifying a
provider
intruffle-config.js
is broken with web3 versions>=1.0.0-beta.38
. This issue is captured already by web3/web3.js#2266. However, the error thrown by web3 in this case (Error: Please provide an valid Web3 provider
) is silenced, likely somewhere intruffle-config
.Steps to Reproduce
The following
truffle-config.js
does not notify the user of the issue when using[email protected]
and all later versions (at time of writing):Output:
Expected Behavior
Truffle should inform the user that web3 has failed to accept the provider, either by bubbling up the exception message directly, or by wrapping it in an error of our own.
Actual Results
The provider scenario silently fails.
Environment
truffle version
): Truffle (unbundled) (core: 5.0.4)node --version
): v11.7.0npm --version
): 6.7.0The text was updated successfully, but these errors were encountered: