Chromium

Set up and run MotionPR with Chromium — the default engine — including the headless shell, installed Chrome or Edge, flags, Linux libraries and troubleshooting.

On this page
  1. Setup
  2. Configuration
  3. Platform dependencies
  4. Troubleshooting
  5. Known limitations

Chromium is MotionPR's default engine. It is Playwright's Chrome for Testing build (158.0.8127.18 with Playwright 1.65), and every MotionPR feature is tested in it.

Setup

Shell
npx motionpr install                  # Chromium, unless browser.name says otherwise
npx motionpr install chromium         # explicitly
npx motionpr install chromium --with-deps   # fresh Linux machine or CI runner (needs root)
npx motionpr doctor --browser chromium

Headless runs use Chromium's headless shell, a smaller build. --only-shell installs only that; --headed and --debug then do not work.

Configuration

TypeScript
// motionpr.config.ts
browser: {
  name: "chromium",                 // the default
  channel: "chrome",                // optional: an installed Google Chrome (or "msedge", …)
  args: ["--font-render-hinting=none"], // optional: Chromium command-line flags
},
OptionApplies to Chromium when
browser.channelit is a Chromium channel (chrome, chrome-beta, msedge, …)
browser.executablePathbrowser.name is chromium
browser.argsbrowser.name is chromium

A channel or binary other than Playwright's build can render fonts and schedule frames slightly differently from the baseline's; captures record the browser version, and the comparison warns (BROWSER_VERSION_DIFFERS) when two versions differ. MotionPR's tests cover Playwright's build.

Platform dependencies

  • macOS, Windows: nothing beyond the download.
  • Linux: --with-deps installs the system libraries Chromium needs (NSS, ATK, GBM and others) with apt, which needs root or sudo. Inside the official Playwright Docker images (mcr.microsoft.com/playwright) they are already present.

Troubleshooting

MessageFix
Chromium for MotionPR is not installed.npx motionpr install chromium
Chromium cannot start: the system libraries it needs are missing.npx motionpr install chromium --with-deps (Linux, root)
Could not launch Chromium: … with a channelInstall that browser, or remove browser.channel
--headed fails after install --only-shellnpx motionpr install chromium (the full build)

npx motionpr doctor --browser chromium launches Chromium once, checks the Web Animations API and reports its timer resolution and frame rate.

Known limitations

  • Chromium's scrollY is a whole number of pixels, so smooth-scroll curves are slightly stepped compared with Firefox's fractional positions. Compare Chromium with Chromium.

See Browser support and Cross-browser testing.