What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

If Puppeteer throws input.on is not a function while starting Chrome, diagnose the browser-launch setup first—not page-level keyboard or form input. In the documented incident, the stack runs through Puppeteer’s launch code while it waits for Chrome’s WebSocket endpoint, then reaches Node.js’s readline constructor. The exception identifies a value that lacks an .on() method; it does not, by itself, identify why that value was passed there. Capture Chrome’s output and check the executable, dependencies, and sandbox before changing launch flags.

What the error means—and what it does not

Node.js objects that emit events, such as EventEmitters, expose an .on() method. The message input.on is not a function means that the particular value supplied as input did not provide that method where the error occurred.

In the Stack Overflow incident associated with this error, the trace passes through Node’s readline constructor and Puppeteer’s waitForWSEndpoint and Launcher.launch functions. That places the observed exception in Puppeteer’s startup/bootstrap path, while it is waiting for Chrome’s endpoint—not in code that types into a page. The trace alone does not establish the underlying cause, and the report dates to 2021 and involves Linux/RHEL; it should not be treated as a universal diagnosis for current versions. See the reported incident.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start by preserving the full stack trace and browser-process output. Then check which Puppeteer package and browser are actually being used, whether Chrome can run as the service user, and whether the host has the Linux libraries and sandbox configuration Chrome needs.

Collect the environment before changing anything

Record these details alongside the complete error. They help distinguish a launch failure from a version mismatch or host configuration problem.

  • Node.js version: record the exact version used by the failing process, not just the version installed on your workstation.
  • Puppeteer package and version: note whether the dependency is puppeteer or puppeteer-core, and its installed version.
  • Operating system: include the Linux distribution or container base image, particularly when production differs from development.
  • Browser selection: record whether Puppeteer launched its downloaded browser or a custom executable, and provide the configured executablePath or channel if applicable.
  • Complete logs: include the whole stack trace and Chrome’s stdout/stderr around the failure.

Do not assume the 2021 Linux report pinpoints a cause in your environment. Use its launch-path clue to direct investigation, then use your own browser output to determine what failed.

Expose Chrome’s output with dumpio

Puppeteer’s dumpio launch option forwards the browser process’s stdout and stderr to the Node.js process streams. This can reveal a Chrome startup message that occurred before Puppeteer raised the readline exception. Enable it temporarily while reproducing the problem and retain the output from the same run as the stack trace. Puppeteer launch options

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const puppeteer = require('puppeteer');

(async () => {
  let browser;
  try {
    browser = await puppeteer.launch({
      dumpio: true,
    });
    console.log('Browser launched');
  } finally {
    if (browser) await browser.close();
  }
})().catch((error) => {
  console.error('Puppeteer launch failed:', error);
  process.exitCode = 1;
});

This example is for a CommonJS project using puppeteer. If your project uses ECMAScript modules, import the package with the syntax used by your project. Do not discard Chrome’s preceding stderr lines: the later input.on exception may be a secondary symptom, while the browser output helps identify the startup problem.

Check that Puppeteer and Chrome belong together

Puppeteer says it works best with the Chrome for Testing build it downloads by default, and it does not guarantee compatibility with other Chrome versions. A custom browser path, a separately updated system Chrome, or a mismatch between the runtime and deployment image can change what actually starts. Puppeteer configuration guidance

If you use puppeteer

Check whether your application relies on Puppeteer’s downloaded browser. Avoid assuming that the Chrome installed on a developer machine is the same executable used in a container or production service. Verify the resolved browser location and test the launch under the same user and environment as the failing process.

If you use puppeteer-core

puppeteer-core does not select a browser for you in the same way. Puppeteer’s guidance is to provide an executablePath or a channel. Confirm that the selected executable exists, is runnable by the service user, and is the version your deployment intends to use. A minimal example with a custom path is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const puppeteer = require('puppeteer-core');

(async () => {
  const browser = await puppeteer.launch({
    executablePath: '/path/to/chrome',
    dumpio: true,
  });
  try {
    console.log('Browser launched');
  } finally {
    await browser.close();
  }
})().catch((error) => {
  console.error('Puppeteer launch failed:', error);
  process.exitCode = 1;
});

Replace /path/to/chrome with the actual executable path available in the runtime environment. If you select a channel instead, verify that the corresponding browser is installed there. Do not combine browser-selection changes with sandbox changes in the same first test: change one variable at a time so the result remains useful.

Check Linux libraries and sandbox setup

On Linux, a Chrome binary can exist but still fail to start because required system libraries are missing. Puppeteer’s troubleshooting guide suggests checking the browser’s dynamic dependencies with ldd chrome | grep not. Run the check against the actual Chrome executable in the affected container or host, not an unrelated local installation. Puppeteer troubleshooting guide

ldd /path/to/chrome | grep not

If the command reports missing libraries, install the required dependencies for the relevant distribution or container image, then rerun the launch with dumpio: true. The exact packages depend on the operating system and image; use the image’s package manager and verify the browser can start as the application user.

Also inspect browser output for a sandbox failure. Puppeteer notes that Chrome can report No usable sandbox! when the host sandbox is not configured correctly. Prefer correcting the host’s sandbox setup over turning the sandbox off.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use sandbox flags only as a targeted test

A Stack Overflow answer for the Linux incident reported that adding --disable-setuid-sandbox resolved that user’s case, but the answer included other launch arguments too. The report therefore does not isolate that flag as the cause, and it does not establish that it will fix other installations. If your logs point to a sandbox issue, test the smallest change justified by those logs and compare the resulting browser output.

Best Value
The SQL Programming Language: .
  • Used Book in Good Condition
const browser = await puppeteer.launch({
  dumpio: true,
  args: ['--disable-setuid-sandbox'],
});

Do not add --no-sandbox as a routine fix. Puppeteer’s documentation warns: “Running without a sandbox is strongly discouraged.” It says to use --no-sandbox only if the content opened in Chrome is absolutely trusted. Disabling the sandbox changes the browser’s security posture; if you consider it for a constrained test environment, make that trade-off explicit and avoid treating it as a production default. Puppeteer troubleshooting guide

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

A focused troubleshooting sequence

  1. Reproduce in the failing environment. Use the same Node.js process, operating system or container image, service account, Puppeteer package, and browser selection as the application that fails.
  2. Save the full stack. Confirm whether the trace reaches readline, waitForWSEndpoint, and Launcher.launch, as in the reported incident. Do not infer a universal root cause from that shape alone.
  3. Turn on dumpio. Capture Chrome stdout and stderr, including lines emitted before the input.on exception.
  4. Verify the browser selection. Check the downloaded Chrome for Testing browser or the configured executablePath/channel; confirm the file exists and the service user can run it.
  5. Check Linux dependencies. If applicable, inspect the executable with ldd /path/to/chrome | grep not and address missing libraries for the specific runtime image.
  6. Investigate sandbox messages. If Chrome reports a sandbox error, fix the host configuration where practical. Test any narrowly targeted flag separately and preserve sandboxing whenever possible.
  7. Retest without unrelated changes. Once the launch succeeds, remove diagnostic-only changes if they are no longer needed, and keep a record of the exact environment and configuration that resolved it.

Common failure patterns and what to check

Symptom or clue What it suggests Next check
The stack reaches readline and Puppeteer launch functions The observed failure is in browser startup while waiting for Chrome’s endpoint, not proof of faulty page-input code. Enable dumpio; inspect browser output and selection.
Chrome output names a missing shared library The runtime image may lack a system dependency. Run ldd on the actual executable and install the required library for that image.
Chrome reports No usable sandbox! The host sandbox may not be configured for Chrome. Correct the host configuration where practical; do not default to --no-sandbox.
Using puppeteer-core with no working browser path or channel The application may not be selecting an executable Chrome can launch. Set and verify executablePath or channel.
Using a custom Chrome version Compatibility is not guaranteed for versions other than Puppeteer’s preferred downloaded Chrome for Testing build. Test with the bundled browser or verify the custom browser choice and version in the failing environment.
A sandbox flag appears to fix one Linux deployment That result is environment-specific; the cited answer bundled several arguments. Isolate the minimal change and assess the security impact before adopting it.

Or skip the browser setup

If your goal is a website screenshot rather than operating a browser directly, ScreenshotNeo provides a screenshot API. Its endpoint accepts one GET request with a URL and returns an image or PDF. For example, this cURL call saves a WebP capture:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers say which page verdict applied and whether it was billed. Its MCP server offers take_screenshot, get_page_info, and capture_pdf tools for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Frequently Asked Questions

Does this error prove that Puppeteer cannot handle keyboard or form input?

No. In the documented incident, the trace points to Puppeteer’s browser-launch path while waiting for Chrome’s WebSocket endpoint, not page-level input handling.

Is `–disable-setuid-sandbox` a guaranteed fix?

No. It was part of an anecdotal Linux workaround that also included other arguments, so the report does not isolate it as the cause or establish a general fix.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.