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
Labels
help wanted
Extra attention is needed
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");
The text was updated successfully, but these errors were encountered: