Puppeteer: Missing X server to start the headful browser. Either set headless to true or use xvfb-...
Headful Linux launch has no available X server.
Headful Linux launch has no available X server.
Error message
Missing X server to start the headful browser. Either set headless to true or use xvfb-...
How this error happens
A Linux server without an X display cannot open a headful Chrome window. Requesting headless: false in that environment fails before a page is created.
Run the failing snippet on a Linux host without an available X server.
await puppeteer.launch({
headless: false,
});
How to fix
Use headless mode for server-side automation when a visible browser is not required.
const browser = await puppeteer.launch({
headless: true,
});
Things to keep in mind
If a headful test is required, provide a working display or Xvfb instead. Keep Chrome’s sandbox enabled; a missing display is not a sandbox problem.