ChainSafe / dappeteer

[DEPRECATED]🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
Other
490 stars 152 forks source link

Have trouble starting metamask #311

Open HelloWeb3World opened 1 year ago

HelloWeb3World commented 1 year ago

Describe the bug I get a lot of error when setup matamask (like 8/10)

image

To Reproduce const browser = await dappeteer.launch({ headless: false, }) const metaMask = await dappeteer.setupMetaMask(browser, { seed: "test test test test test test test test test test test junk", password: "xxx", });

Logs

Some Logs from console

Expected behavior can setup metamask successfully

Screenshots If applicable, add screenshots to help explain your problem.

System:

Additional context Add any other context about the problem here.

stefan-girlich commented 1 year ago

Same issue for 100% of attempts. This error is logged in Chrome DevTools; not sure if related:

s:76 Error: No response from RPC
  at ui-10.js:1:258405
  at s (sentry-install.js:1:12302)
(anonymous) @ s
BeroBurny commented 1 year ago

Hey @HelloWeb3World and @stefan-girlich

Currently, there is resealing a new version 5.1.0, that version will have the latest MetaMask version, and is possible that will solve the issue running it. If is issue still present can I get some reproducting repository?

stefan-girlich commented 1 year ago

Thanks for the prompt reponse, @BeroBurny . Happy to try out the new version; would you know when it will be published on npm?

stefan-girlich commented 1 year ago

fyi: I was able to reproduce the same error with playwright. @BeroBurny - would you know when 5.1.0 is available via npm? thx!

BeroBurny commented 1 year ago

Hey, sorry for the delay (weekend, and stuff). Had a problem with ci for releasing 5.1.0 but fixed it and released 5.1.1

KIttojo commented 1 year ago

@BeroBurny I have such params at config

  "dependencies": {
    "@chainsafe/dappeteer": "^5.1.1",
    "puppeteer-core": "^20.2.1"
  }

But this problem still occurs. When fix, sir?

image
sofianeOuafir commented 1 year ago

same issue here with 5.1.1 any work around?

Evan-Baekdu commented 1 year ago

Any solution?

mint-pz commented 1 year ago

I tried to reload the metamask page and here is my workaround code:

const browser = await dappeteer.launch({ headless: false })

 await sleep(2000)

    const pages = await browser.pages()
    for (const page of pages) {
        if (page.url().startsWith('chrome-extension')) {
            await page.reload()
        }
    }

await sleep(2000)

const metaMask = await dappeteer.setupMetaMask(browser, {
seed: "test test test test test test test test test test test junk",
password: "xxx",
});

System: