metamask-extension
metamask-extension copied to clipboard
[Bug]: clicking on etherscan's "Connect to web3" always fail
Describe the bug
After opening this page and switching to the "Write Contract" tab, I click on the "Connect to web3" button, it instantly reports:
{code: 4902, message: 'Unrecognized chain ID. Try adding the chain using `wallet_addEthereumChain` first.'}
This problem is gone if I do it on mainnet, but I'm sure the sepolia network is already added to the list.
(Maybe it's more proper to fire this issue to etherscan, but it seems etherscan is not open source...)
Expected behavior
"Connect to web3" should work as expected.
Screenshots/Recordings
Steps to reproduce
Already described above.
Error messages or log output
No response
Version
11.14.5
Build type
None
Browser
Chrome
Operating system
MacOS
Hardware wallet
No response
Additional context
No response
Severity
No response
Hi @zhiqiangxu, thanks for reporting this issue.
Question: Is this bug still occurring if you manually switch to the Sepholia network in MetaMask before connecting? would you mind providing the RPC network / chain ID you were using at the time of the screenshot?
Yes, it's still occurring even if I manually switch to the Sepholia network in MetaMask before connecting.
(Another side problem is that the toggle button for "Show test networks" doesn't work neither.)
This is what shows when I click on the sepolia network:
So it seems the network information for sepolia is somehow wrong? I can't manually edit it since it's locked.
Confirmed that this error seems to be reproducible in 11.16.14, but appears resolved in upcoming 12.0.0 builds.
Seems to be resolved on 12.0.5 please let us know if you encounter this issue on that version or higher.