MetaMask / MetaMask/metamask-extension

[Bug]: MetaMask doesn't Popup

Open
#14,534 2 comments 0 reactions 0 assignees View on GitHub
area-api T08-featureRequest ux-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### Describe the bug

when calling this function if it's waiting for a request it throws an error and don't pop up
`accounts = await ethereum.request({ method: "eth_requestAccounts" });`

![image](https://user-images.githubusercontent.com/26887703/165343523-71e21e00-1a88-4c00-b921-278dc35251e2.png)

![image](https://user-images.githubusercontent.com/26887703/165343488-da89f392-e217-4544-b5fb-c57ad446d08d.png)

Is there a way to threat this error ? or at least a function that should open the metamask// just pop up it.
I believe it would be nice.

![image](https://user-images.githubusercontent.com/26887703/165344030-ab1b7208-34f9-47a6-b10e-190280a8cfe1.png)

TL:DR:
after you minimized the pop upped window it does not pop up again.
I believe that due to user experience it should.

### Steps to reproduce

1. Have a function like this that call to open the metamask:
```
const connectWallet = async () => {
try {
const { ethereum } = window;

if (!ethereum) {
alert("Get MetaMask!");
return;
}

const accounts = await ethereum.request({ method: "eth_requestAccounts" });

console.log("Connected", accounts[0]);
setCurrentAccount(accounts[0]);

} catch (error) {
console.log(error)
}
}
```
2.just have a button that calls it.
3 run the app click it.

### Error messages or log output

```shell
MetaMask - RPC Error: Already processing eth_requestAccounts. Please wait.
{
"code": -32002,
"message": "Already processing eth_requestAccounts. Please wait."
}
```

### Version

10.12.4

### Build type

_No response_

### Browser

Chrome

### Operating system

Linux

### Hardware wallet

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

The reported entry point is window.ethereum.request({ method: "eth_requestAccounts" }) in the provided connectWallet function. Start by reproducing the minimized-popup flow and inspect how the extension handles the -32002 "Already processing" response. Done means the requested wallet interaction is reliably surfaced again or the behavior and expected handling are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.