Skip to content

browserName: "chromium" does not clear default channel: "chrome" #320

@Josh-Theory

Description

@Josh-Theory

Version

  • @playwright/cli: 0.1.1
  • bundled playwright: 1.59.0-alpha-1771104257000
  • Node: v24.14.0
  • OS: Linux (WSL2)

Repro

.playwright/cli.config.json:

{
  "browser": {
    "browserName": "chromium"
  }
}

Run:

playwright-cli open --config=.playwright/cli.config.json https://example.com

Expected
Plain Playwright Chromium should launch, since only browserName: "chromium" is configured.

Actual
playwright-cli still behaves as if launchOptions.channel is set to "chrome".

Without env overrides I get:

browserType.launch: Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Run "npx playwright install chrome"

Likely cause
playwright/lib/mcp/browser/config.js defaults to:

browser: {
  browserName: "chromium",
  launchOptions: {
    channel: "chrome"
  }
}

and mergeConfig() preserves that default channel even when config only sets browserName. So there is no way to express “use Chromium with no channel” via JSON config.

Notes
Direct Playwright works when no channel is passed:

const { chromium } = require('playwright');
await chromium.launchPersistentContext(userDataDir, { headless: true });

This seems specific to playwright-cli config resolution, not Playwright itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions