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
Invalid warning: Could not fetch chain ID. Is your RPC URL correct? #13167
Comments
@danfinlay Were you running a local node at https://localhost:8871 when you saw this bug? |
I've been trying a couple of times to test this and to me it seems to be working in an expected way (up to some point). I've noticed that some of the errors can occur in the console of the app while they're also displayed in the Network tab and logged as failed requests. So, I think it's not always going through the background process, since I was using the main app console and network tab rather than background. Here is an example of adding the provided RPC URL without running blockchain network on localhost (on that port, etc): And here is the video where I was experimenting with local blockchain running with Ganache and where I was entering some invalid ports and invalid chain ids: The only thing I've noticed that might be incorrect is when I try to edit the network and put some invalid RPC instead of the valid one that I've added previously. In that case, it will takeover the form and return the valid RPC and network configuration as it was before. We would appreciate getting more information on this and some acceptance criteria about what would need to be changed or investigated in the given scenario. Thanks. //cc @danjm @danfinlay |
@EHaracic I am removing this from the PS Team backlog for now. Given the difficulty in reproduction it is not important, and your findings so far are very helpful. |
I am getting the same problem. The form behaves quite strangely as it keeps updating the chainId. I have a geth node running with Rinkeby and every x seconds, Metamask updates the form to chainId.mp4 |
Not sure if this is still being tracked, but for anyone having this problem this seems to be a problem with Firefox HTTPS-Only mode. If you enable Firefox' HTTPS-Only mode (even if you set your node's RPC endpoint in the exception list) Firefox forcefully upgrades the connection to HTTPS to check CORS, which fails if your endpoint doesn't support HTTPS. Also the CORS setting of your node needs to allow the MetaMask extension. In the case of Erigon you can do this by adding the So the solutions is:
|
How can i add my network and blockexplorer to metamask via chainlist.org? i made a fork, kept doing pull requests but i never can add my rcp url chain ID to chainlist.org, edit .jsons with my data, etc...the pull requests dissapear in hours. In ganache i can set values but at metamask the chainID gives me the error https://github.com/MetaMask/metamask-extension/issues/. I dont know why is everything denied/deleted |
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions. |
I experience the same problem with Metamask in Firefox. However, I am not trying to add a local node but a regular testnet. Using Chrome I could add it, but in Firefox I always get the error "Could not fetch chain ID. Is your RPC URL correct?" |
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions. |
This issue was closed because there has been no follow up activity in the last 45 days. If you feel this was closed in error, please reopen and provide evidence on the latest release of the extension. Thank you for your contributions. |
Reproduction steps:
https://localhost:8871
)Could not fetch chain ID. Is your RPC URL correct?
Looking in the network tab of the background process, I can see that no chain_id validation request was sent. It seems some validation is getting triggered incorrectly, and preventing adding locally-hosted custom networks.
This error can also be shown when trying to edit the RPC of an existing domain to be a local one. So for example alternative repro:
Optimistic Ethereum
https://localhost:8871
.The text was updated successfully, but these errors were encountered: