Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

182
Views
Puppeteer fails to launch on macOS (Socket path too long)

I am using the following script to launch a Puppeteer instance:

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    headless: false, // show the browser
    devtools: true, // open dev tools
    defaultViewport: null, // ensure that browser viewport fills the window
    args: [
      '--disable-web-security', // disable CORS (be careful)
    ],
  });

  // navigate to the Angular page
  const page = await browser.newPage();
  page.goto('http://localhost:4200');
})();

Since upgrading to macOS Monterey, I get the following error when running the script:

UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
[86046:259:1202/104944.082215:FATAL:process_singleton_posix.cc(246)] Check failed: SetupSockAddr(path, addr). Socket path too long: /var/folders/qy/dsjty77j5p545xnfk2mp3j6m0000gn/T/com.apple.shortcuts.mac-helper/.org.chromium.Chromium.G3zxw9/SingletonSocket

This happens with any script that runs Puppeteer on my system.

It looks like Puppeteer is trying to launch using a config path from an instance that Shortcuts has previously launched, and the path is too long for a socket path. I still get the error if I'm not running the script from a shortcut.

As a temporary fix I have been providing the executablePath property to Puppeteer:

const browser = await puppeteer.launch({
  ...
  executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
});

This isn't ideal, but does the trick. Any ideas how I can force Puppeteer to reset to no longer use the Shortcuts path?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!