Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

How to connect to an existing browser with MetaMask already installed? #331

Open
yt7260 opened this issue May 11, 2023 · 1 comment
Open
Labels
help wanted Extra attention is needed

Comments

@yt7260
Copy link

yt7260 commented May 11, 2023

Describe the problem
A clear and concise description of what the problem is.

OS: win 10
NodeJs version v18.13.0
dappeteer version 5.1.1
puppeteer version 19.8.1

I have already connected to an existing browser that has Metamask installed, but I am unable to operate it.

const browser = await puppeteer.connect({ browserWSEndpoint: res.data.data.ws.puppeteer, defaultViewport: null, headless: false });
const userData = "E:/.cache/j5y43xo_hdspfh/Default/Extensions/";
const browserInstance = new DPuppeteerBrowser(browser, userData, false);
const metamask = await dappeteer.getMetaMaskWindow(browserInstance);
await metamask.unlock('111111');

The error message:
throw new Error("You can't sign in because you are already signed in");

@yt7260 yt7260 added the help wanted Extra attention is needed label May 11, 2023
@openluminus
Copy link

This issue looks a lot like #299

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants
@openluminus @yt7260 and others