You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
All issues which aren't created with this template will get immediately closed.
This happens on an Angular 7 project, I am not sure if this issue also affects other frameworks or if it is some combination with the dependencies that Angular pulls.
After some debugging (that was made harder due to zone.js), I found out that when a net::ERR_NAME_NOT_RESOLVED or an net::ERR_CONNECTION_REFUSED error will happen request.onreadystatechange will get called with request.readyState === 4 && request.status === 0.
Since there is no handling of this case the promise will not resolve at all.
Promise should reject when the connection is refused or DNS fails to resolve.
Actual behavior
The promise never resolves/rejects.
Steps to reproduce the behavior
Set an invalid rpc endpoint url on the HttpProvider. It can be either an url of of something that is not an rpc endpoint or and invalid url that dns cannot resolve.
Attempt to get the chain id await this.web3.eth.net.getId();