-
Notifications
You must be signed in to change notification settings - Fork 154
Connect to existing instance of browser #299
Comments
Hey, thanks for reaching out. The issue is you are sending a const browserInstance = new DPuppeteerBrowser(browser, userData, false);
const metamask = await dappeteer.setupMetaMask(browserInstance) |
How can we call new DPuppeteerBrowser()? What should we import to file? I tried to add |
I solved it, just need to import But what does |
@BeroBurny, same issues on my side, I'm trying to do exactly the same thing as @Velkonost. I this piece of code, but nothing happens: const dappeteer = require("@chainsafe/dappeteer");
const {
DPuppeteerBrowser,
} = require("@chainsafe/dappeteer/dist/puppeteer/browser");
// function
const { port, wsEndpoint } = await openBrowser(profileId);
const browser = await puppeteer.connect({
browserWSEndpoint: `ws://127.0.0.1:${port}${wsEndpoint}`,
});
const browserInstance = new DPuppeteerBrowser(browser, "", false);
const metamask = await dappeteer.setupMetaMask(browserInstance);
await metamask.unlock(getMetamaskPassword(profileId)); What I'm trying to achieve might be different from @Velkonost, since I don't want to setup a new metamask, but rather unlock the existing instance. I ask myself the same questions as @KIttojo: What parameters should we use in this function? |
Describe the problem
I launch browser's instance from an
anty dolphin
and I have port, wsEndpoint of it.How can I connect dappeteer to this instance?
System:
Part of code:
I've tried to setup like this:
but no effect
The text was updated successfully, but these errors were encountered: