Sparticuz / chromium

Chromium (x86-64) for Serverless Platforms
MIT License
956 stars 67 forks source link

[BUG] const page = await context.newPage() wont work #267

Closed wanghaisheng closed 5 months ago

wanghaisheng commented 5 months ago

Environment

Expected Behavior

I have tried both playwright version, and also try to use const page = await browser.newPage(), all failed

    const browser = await playwright.launch({
      args: sparticuzChromium.args,

      executablePath: await sparticuzChromium.executablePath("https://github.com/Sparticuz/chromium/releases/download/v123.0.0/chromium-v123.0.0-pack.tar"),
      headless: sparticuzChromium.headless,
    })
    console.log("Chromium:", await browser.version())

    const context = await browser.newContext()
    console.log("new context")

    const page = await context.newPage()
    console.log("new page")

should print new page

Current Behavior

log only get context

new context

Steps to Reproduce

git clone https://github.com/wanghaisheng/ahref-free-tool-api run on vercel and change runtime to 18.x

Possible Solution

Xocix commented 5 months ago

happening to me as well out of nowhere, been running it for several months without issues: "@sparticuz/chromium": "^116.0.0", "puppeteer-core": "^21.1.1"

jmandawg commented 5 months ago

Did you try to remove this line:

chromium.setGraphicsMode = false;
francobasilico commented 4 months ago

Hey @wanghaisheng did you sort the problem? I'm having the same issue since april?