MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.7k stars 4.79k forks source link

can not cancel "switch network" => can not access account list any more #12052

Closed SvenMeyer closed 10 months ago

SvenMeyer commented 2 years ago

Metamask-switch-network

danjm commented 2 years ago

@SvenMeyer Can you provide some more details.

Which browser are you using? Which version of MetaMask are you using? What network were you on when you first went to solarbeam.io?

SvenMeyer commented 2 years ago

browser : Chromium on Linux , Version 93.0.4577.63 MetaMask Version : 10.0.3 website : solarbeam.io - BE CAREFULL could even be a malicious website (but it should not be able to block Metamask) I think I even was already on the moonriver network , the same one it wanted me to switch to ...

Network Name: Moonriver RPC URL: https://rpc.moonriver.moonbeam.network ChainID: 1285 Symbol (Optional): MOVR Block Explorer (Optional): https://blockscout.moonriver.moonbeam.network/

https://docs.moonbeam.network/tokens/connect/metamask/

imsys commented 2 years ago

Seems similar to #11799

imsys commented 2 years ago

I just did a test on the same website you mentioned, and it worked fine, no problems. But I'm having the same problem in Firefox.

Chromium on Linux, Version 92.0.4515.107 MetaMask Version : 10.1.0

imsys commented 2 years ago

Upgraded to Chromium 93.0.4577.82, and still no problem there.

daemianmack commented 2 years ago

I've been suffering this problem in Firefox on OSX. It only happens in Firefox -- not Chrome or Brave, all of which I use frequently.

The problem is actually worse than the opening comment on this issue implies, because some networks (Fantom is the biggest offender) are aggressive about switching you back to their network even when you're on a different tab trying to use some other network. In this case, you cannot interact with the app because a background tab is requesting you switch networks, and you cannot cancel the dialog.

The only workaround is go find all the tabs on the requesting network, kill them, and reload the page you want to interact with. This can happen at any time, even in the middle of a series of transactions.

SvenMeyer commented 2 years ago

@imsys mhh, now that I am reading your comment, I would not rule out that I actually was using Firefox, not Chrome :-|

imsys commented 2 years ago

@imsys mhh, now that I am reading your comment, I would not rule out that I actually was using Firefox, not Chrome :-|

@SvenMeyer so it's probably Firefox, I just compared the top-right bar, and your screenshot has the menu button of Firefox. In Chrome and Chromium it is a bit different.

michaelday008 commented 2 years ago

@danjm reproduction and more info here...

I have this issue and it's a real pain.

Latest Metamask, latest firefox, Windows 10.

Here's how I reproduce it.

  1. Open up some tab that uses a specific network like pancakeswap and ensure you are on the correct network
  2. Open up another tab that uses a different network like synapse protocol
  3. Switch to the different network
  4. Now suddenly pancake tries to switch you back to Binance
  5. Get annoyed with pancake trying to switch and close the pancake tab
  6. Now click the cancel button... Nothing happens
  7. Click the switch network button, nothing happens
  8. Cannot view account list because the switch network dialog removes all other options (no ... menu etc)

The only way I found out of this is to open up yet another tab, and go to some other site that uses a different network, then let it pop the switch dialog, then accept the switch, and which point the option to interact with all the existing switch options in queue start working again.

The key to reproducing this bug is to close the tab that asked you to switch instead of pressing the cancel button inside that tab. Once that tab is closed, the switch queue becomes non interactable. Also, pancakeswap seems to be the worst offender for asking you to network switch back when the pancake tab is not active.

If you press the x on the "popup" style switch the first time, it clears properly. If you press cancel on the "popup" style switch, it also works, but if you close the tab, the "popup" goes away, and now when you click on the metamask icon in the browser toolbar, you have a stuck non-popup that has replaced your wallet assets list.

Please note the difference between the popup (which appears in the tab that asked), and the replaced wallet list in the shots below:

image

image

ccajas commented 2 years ago

Agreed with @daemianmack, it seems counterintuitive for MetaMask to suggest switching the network for a tab that is out of focus. The user voluntary changed focus to a different tab with a website that uses a different network and is expected that they want that network.

Often I find myself switching back twice, because of the following:

Open tab with website using network A MetaMask is on network A Open tab with website using network B Change to network B Metamask pops up "switch the network" for A I click "Switch network" to A (because the "cancel" button does not work) I use the drop-down list to select and return to B

I'm also on Windows 10 using the latest Firefox.

It may be appropriate to raise a separate issue for this behavior, as it relates to checking which browser tab should stay relevant.

github-actions[bot] commented 12 months ago

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.

github-actions[bot] commented 10 months ago

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.