question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to handle metamask with changed network?

See original GitHub issue

I have a dapp that works with multiple networks in metamask, so I need to instruct user to change network between the steps. When I tried doing a transaction with the changed backend metamask json rpc signer, it returned this error:

underlying network changed (event="changed", network={"chainId":5196,"name":"Test EraSwap Network"}, detectedNetwork={"name":"kovan","chainId":42,"ensAddress":null}, code=NETWORK_ERROR, version=providers/5.0.9)

What is the best way to deal this situation?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ricmoocommented, Oct 16, 2020

Oh thanks! Yes, I should port much of that over to the docs. People should have to search through issues to find things the docs should mention. 😃

1reaction
zemsecommented, Oct 16, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add or change a MetaMask network on your wallet ...
1. Open the MetaMask wallet · 2. Go to Settings and select Network · 3. Click on Add Network · 4. Click on...
Read more >
Guide on How to Switch Network in Metamask - DappRadar
If you want to change the network of your Metamask, for example to the Kovan test network, you need to click the 'down...
Read more >
How to Change Networks on MetaMask: Extension and ...
Step 1: Log in to MetaMask · Step 2: Click open the Network Selector drop-down menu · Step 3: Switch your MetaMask network....
Read more >
No Longer Reloading Pages on Network Change | MetaMask
At long last, in early 2020, MetaMask will no longer reload web pages when the selected network changes. This will be a breaking...
Read more >
How to switch network in MetaMask on Polygon
Option 3. · 1. Open MetaMask and click the network dropdown menu, which is located at the top of the window. This will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found