I am using Remix to deploy a smart contract. To test it out, I am connected to the Rinkey testnet on Metamask, and Metamask is connected to Remix. However, Remix thinkgs that I'm on the mainnet, and simply cannot recognize the testnet that Metamask is currently connected to.

I have attempted various things, including

  • Hard refreshing the Remix tab (command shift 5)
  • Tried multiple browsers (Chrome, Firefox)
  • Removed the Remix connection from Metamask and re-added

Please see the image below depicting my issue. Any help is appreciated!

Remix IDE showing that I'm on the rinkeby testnet on Metamask, but Remix thinking I'm on the mainnet

PS: I know this is not an Ethereum specific question, but more about Remix. I have already reached out to Remix on gitter but have not heard back with a solution. Given Remix is the most popular IDE for eth development, I thought it was fair to ask here as well.

  • Do you have another plugin that has a web3 provider? Coinbase wallet extension?
    – Ismael
    Apr 9, 2022 at 22:50
  • Did you try to clear the cookie from page? Apr 10, 2022 at 10:18

2 Answers 2


The issue could also be that another wallet without the right network or networks tokens is already connected as the "Injected Provider" environment in Remix.

If this is the case, make sure to log-out of your first wallet. I sometimes remove it from my bookmarks too. You can then connect your Remix to Metamask.


As it's a Remix question, adding the entire contract write + deployment process in case it's helpful:

  1. Add and compile the contract code into Remix
  2. Add your chosen RPC provider (Alchemy, etc) as a network in Metamask
  3. If it's a Ethereum testnet, get testETH from faucets like Sepolia or Goerli for your Metamask
  4. Connect Metamask to Remix. Remove other connected wallet first before connecting Metamask
  5. Deploy your contract by choosing the "Injected Provider" as the deployment environment. This injected provider comes from Metamask


Here is a Remix tutorial with more details


metamask > connected sites > disconnect Remix > refresh > set metamask network to what you want > connect again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.