Skip to content
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

[Bug]: Extension window doesn't popup on request #13590

Closed
gVguy opened this issue Feb 10, 2022 · 33 comments · Fixed by #13840
Closed

[Bug]: Extension window doesn't popup on request #13590

gVguy opened this issue Feb 10, 2022 · 33 comments · Fixed by #13840
Assignees
Labels
Sev2-normal Normal severity; minor loss of service or inconvenience. stability type-bug

Comments

@gVguy
Copy link

gVguy commented Feb 10, 2022

Describe the bug

Metamask 10.9.2
Chrome 98.0.4758.80 (Official Build) (arm64)

If metamask is not unlocked yet (fresh browser start), the popup window doesn't show.

If the extension is pinned, I can see the "notification" number appearing, other than that there's no feedback. And if the extension is not pinned, there's no way for the user to tell there's an action expected from him.

Request promise is forever pending, and if the page is reloaded the new request errors out with:
MetaMask - RPC Error: Already processing eth_requestAccounts. Please wait. {code: -32002, message: 'Already processing eth_requestAccounts. Please wait.'}

This issue describes similar problem, but it was closed a year ago.

Steps to reproduce

  1. Relaunch chrome so the extension locks
  2. Go to metamask docs site example section
  3. Click on the 'enable ethereum' button, which is supposed to activate the popup
  4. Nothing happens

Error messages or log output

No response

Version

10.9.2

Build type

No response

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

@jsheely
Copy link

jsheely commented Feb 10, 2022

This appears to be a regression in the latest release 10.9.2 as it was working fine earlier in the week.

I will go spelunking through the diff and see if I can spot the regression

@gVguy
Copy link
Author

gVguy commented Feb 10, 2022

I noticed it happens when you're already connected to the site, but not logged in to metamask
If you're not yet connected it seems to work fine

@jsheely
Copy link

jsheely commented Feb 10, 2022

In my case it appears to be happening for first time users to the site and your account is locked.

@cryptophonic
Copy link

This is happening here as well on Chrome, same MetaMask version

@eth-skywalker
Copy link

happening for me as well on both Chrome and Firefox

@pacokleitz
Copy link

pacokleitz commented Feb 13, 2022

not woking for me either in 10.9.2 with ethers.js and firefox, can't get a metamask pop-up to open when asking for eth_requestAccounts, it was working fine some days ago;

@jsheely
Copy link

jsheely commented Feb 13, 2022

I tested and was able to confirm that this bug is not present in version 10.8.2

A lot of UI code was changed between these two versions so I haven't been able to diff which updated caused the bug yet.

@tmashuang
Copy link
Contributor

tmashuang commented Feb 14, 2022

For anyone still having this issue have you interacted with the extension at all before dapp interaction/connection?
What happens when you pin/unpin, or simply open the extension, before interacting with the site (the site might need to be refreshed)?
What happens when you disable and enable the extension, then refresh the dapp?
Possibly related to #11730 and #7221 with extension injection issue when browser's startup tab setting is set to "Continue where you left off".

@gVguy
Copy link
Author

gVguy commented Feb 15, 2022

Opening / unpinning-pinning the extension prior to dapp interaction doesn't seem to have the effect on described behavior. The only thing that helps is if you open the dapp page, manually open the extension, unlock it with your password, and only then interact with the connect button. Then the popup shows.

@cryptophonic
Copy link

I think we're seeing the same thing - need to manually open the extension and log in, then it seems to work again.

@addmorebass
Copy link

This is not working for me as well. The wallet does not pop-up with the password on a locked wallet.

@beskay
Copy link

beskay commented Feb 17, 2022

I noticed it happens when you're already connected to the site, but not logged in to metamask If you're not yet connected it seems to work fine

Same issue here, when you are already connected to the site (but metamask is locked), this error pops up.

When i remove the site connections and then try it again with metamask locked, metamask pops up and everything works fine.

It also works when im logged in, then it instantly connects (if theres an active site connection).

@KenoLeon
Copy link

KenoLeon commented Feb 18, 2022

Writing an article on Metamask and my recommendation is to add a note to manually login to Metamask before connecting ( You can check window.ethereum._state to check status), but yeah no popup unless I remove the site from the sites list AND delete cookies.

@Gudahtt Gudahtt added the Sev2-normal Normal severity; minor loss of service or inconvenience. label Feb 23, 2022
@amamujee
Copy link

https://www.loom.com/share/1eb8077e32da420b911fca44ca235934 - here is a loom video of the issue in case it's related.

@kevinghim kevinghim added Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. and removed Sev2-normal Normal severity; minor loss of service or inconvenience. labels Feb 23, 2022
@kevinghim kevinghim added Sev2-normal Normal severity; minor loss of service or inconvenience. and removed Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. labels Feb 23, 2022
@theCuratorCM
Copy link

What can we do about this?

@Jochy1873
Copy link

Jochy1873 commented Feb 24, 2022 via email

@Jochy1873
Copy link

Jochy1873 commented Feb 24, 2022 via email

@Jochy1873
Copy link

Jochy1873 commented Feb 24, 2022 via email

@Jochy1873
Copy link

Jochy1873 commented Feb 24, 2022 via email

@Br3ikros
Copy link

Are you guys going to fix this? You know how annoying it is for a user to go back to their metamask, disconnect a website and try to login again? And how do you explain it to them? It was working just fine a few weeks ago and now this.

I login to metamask from my website, I close chrome, and if reopen it and I try to login again I get that a request is already processing. May someone fix this please or at least give us updates?

@addmorebass
Copy link

I agree. It is very annoying and need to be fixed!

@AgentDarren
Copy link

Please fix this. It creates user confusion and a poor user experience.

@Br3ikros
Copy link

Excuse me, but any news on this?!?!?! Why is no one giving a solution? Can anyone point us to the right direction?

@kevinghim
Copy link
Contributor

@Br3ikros fixed via #13840

@andressaribeiro
Copy link

Hey guys, I don't know if this is related but we're still having this issue on v10.11.1.

Steps to reproduce:

  1. Go to https://opensea.io/ on Chrome or Brave
  2. Click on Metamask to open popup
  3. Close the popup without filling your password
  4. Close the browser
  5. Open the browser on https://opensea.io/ again
  6. Click on Metamask

Result: the popup does not open and there's no feedback, is it related or should I open a new issue?

Bug.on.metamask.mp4

@joestakey
Copy link

Same issue here, with 10.11.1 as well. Currently getting around it by displaying a message telling the user to manually go to their Metamask extension to connect.

@yilmazbingo
Copy link

If pop does not open, go to chrome extensions and see the metaamsk wallet will have 1 mark on it and log in.

Looks like I did not login when pop up opens but it did not show it as an open tab. usually, If metamask is open, I see extra chrome tab for metamask.

@faizara487
Copy link

faizara487 commented Oct 24, 2022

Hi, any update on the issue? Popup still not opening if closed without putting password. It just shows notification badge on the pinned extension. Has anyone found a solution yet?

@onsolution10
Copy link

if you have more than one wallet extension like( safpal ) remove them and test wih metamask
its work for me

@samparmenter
Copy link

Still an issue...

@rchippada
Copy link

If anyone else happens to be here with this issue, this is what helped me, after a couple days of agony and trying several things suggested in various other places.

This URL helped me: https://docs.metamask.io/wallet/get-started/set-up-dev-environment/#connecting-to-metamask

Specifically, how I get the provider in my App.js

Instead of const provider = new Web3.providers.HttpProvider("http://127.0.0.1:8545") using
const provider = await detectEthereumProvider() did the magic for me.

@iuriibilonog
Copy link

This solution helped me:

const handleClickWallet = () => {
if (window.ethereum) {
window.ethereum
.request({ method: "eth_requestAccounts" })
.then((account) => {
setAccountAddress(account[0]);
getBalance(account[0]);
})
.catch((err) => {
if (err?.code === -32002 && !ref.current) {
ref.current = true;
tryToReconnectWallet();
}
});
window.ethereum.on("accountChanged", handleClickWallet);
window.ethereum.on("chainChanged", chainChangedHandler);
} else {
console.log("Not added");
}
};

const tryToReconnectWallet = () => {
window.ethereum
.request({
method: "wallet_requestPermissions",
params: [
{
eth_accounts: {},
},
],
})
.then(() => handleClickWallet())
.catch((err) => console.log("Error:", err));
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sev2-normal Normal severity; minor loss of service or inconvenience. stability type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.