-
Notifications
You must be signed in to change notification settings - Fork 5k
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
More helpful error message instead of Failed to subscribe to new newBlockHeaders #3498
Comments
Do you think this might be a variant of the bug described in #3432? As you note, your provider is However, it's possible WalletConnect has its own EventEmitter-like interface which Web3 is getting confused by. If so:
|
99% of WalletConnect enabled websites are using Infura over HTTPS today, so I think that's where the issue comes from. Also the underlying issue is that web3.js tries to do too much itself - currently it is a black box how the waiting of a receipt works with |
@miohtama Ok thanks.
Agree, the |
@miohtama |
|
Expected behavior
When
await web3.eth.send()
result, a timeout error gives a helpful error message.It could say, for example,
web3.js waited the transaction for the configured X seconds. However the transaction was not confirmed before the deadline. The transaction receipt waiting process was aborted, but the transaction might be still confirmed. If you wait for longer, you can configure X or connect web3.js using a WebSocket connection
Also, the thrown Error object could contain a special field so that the library consumer can easily check for this condition and gracefully handle this in the user interface.
Actual behavior
You get an error message
Failed to subscribe to new newBlockHeaders to confirm the transaction receipt
.This is strictly not true, as one would be able to confirm the error message if the default timeout 750 seconds is not reached.
Steps to reproduce the behavior
Environment
The text was updated successfully, but these errors were encountered: