Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][Regression]: Running two contexts at same time causes firefox to wait endlessly #34586

Open
fawazahmed0 opened this issue Feb 2, 2025 · 1 comment
Assignees
Labels

Comments

@fawazahmed0
Copy link

fawazahmed0 commented Feb 2, 2025

Version

1.50.1

Steps to reproduce

const { firefox } = require('playwright');


let browser

async function begin() {
    while (true) {
        browser = await firefox.launch({ headless: true })
        await Promise.all([run(), run()])
        await browser.close()
    }
}

begin()

async function run() {
    let context = await browser.newContext();
    let page = await context.newPage();
    await page.goto('https://playwright.dev/')
    console.log("completed")
}

Expected behavior

Code should continuously print completed

Actual behavior

Code stops printing completed at some point

Additional context

Running two contexts at same time causes the browser to get stuck for eternity

Note: This is regression, the issue does not happen in 1.49.1

Environment

System:
    OS: Windows 11 10.0.22621
    CPU: (6) x64 AMD FX(tm)-6300 Six-Core Processor
    Memory: 12.64 GB / 23.80 GB
  Binaries:
    Node: 23.6.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
    bun: 1.1.3 - ~\.bun\bin\bun.EXE
  IDEs:
    VSCode: 1.96.4 - C:\Users\nawaz\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  npmPackages:
    @playwright/test: ^1.50.1 => 1.50.1
    playwright: ^1.50.1 => 1.50.1
    playwright-extra: ^4.3.6 => 4.3.6
@fawazahmed0 fawazahmed0 changed the title [Bug]: Running two contexts at same time causes firefox to wait endlessly [Bug][Regression]: Running two contexts at same time causes firefox to wait endlessly Feb 2, 2025
@dgozman
Copy link
Contributor

dgozman commented Feb 3, 2025

I can repro this on Windows, but not on macOS. The second concurrent newPage() hangs, with Browser.newPage call never responding and Browser.attachedToTarget never arriving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants