playwright: [BUG] Firefox tests crash with "Unexpected number of tabs in the new window"

Context:

  • Playwright Version: 1.13.1
  • Operating System: Windows
  • Node.js version: v12.22.4
  • Browser: Firefox
  • Extra: N/A

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:

C:\dev>npx playwright ff google.com
[open: Protocol error (Browser.newPage): Unexpected number of tabs in the new window: 2 newPage@chrome://juggler/content/TargetRegistry.js:321:13

] {
  name: 'Error'
}

Describe the bug

Trying to run tests, even just using the npx playwright ff google.com command as per above, crashes in Firefox immediately. When I run not in headless, I can see the extra Firefox privacy tab:

image

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 30 (3 by maintainers)

Most upvoted comments

A new version of Java gets released soon!

Hello ! I had the same issue today with Playwright 1.30.0, it seems fixed in 1.31.0

Using 1.30.0 on Ubuntu 22.04.1, I still get this error with

Playwright.create().firefox().launch(new BrowserType.LaunchOptions().setHeadless(false).setFirefoxUserPrefs(Map.of("browser.privacySegmentation.preferences.show", false))).newContext().newPage();

even after

rm -rf ~/.cache/ms-playwright/firefox-1372

First a popup is shown

Failed to read the configuration file. Please contact your system administrator.