I’m encountering a problem when attempting to initialize a Puppeteer Cluster setup on my Ubuntu 24.04 system. The specific error that keeps appearing is:
Failed to create browser cluster: Unable to start browser, error: kill EACCES
Here are the troubleshooting methods I’ve attempted:
- Reinstalled
chromium-browserseveral times and double-checked the installation path - Installed necessary system libraries:
sudo apt install libasound2 libatk1.0-0 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libxss1 libgconf-2-4 libgtk-3-0 libxshmfence1
- Configured the
executablePathto point to/usr/bin/chromium-browser - Updated file permissions:
sudo chmod 755 /usr/bin/chromium-browser
- Cleared
node_modulesand reinstalled packages
My current browser initialization code looks like this:
const initializeBrowserCluster = async () => {
try {
const config = {
headless: 'new',
args: [
'--no-sandbox',
'--disable-background-timer-throttling',
'--disable-web-security',
'--disable-features=TranslateUI'
],
executablePath: process.env.BROWSER_PATH || '/usr/bin/chromium-browser'
}
const clusterInstance = await Cluster.launch({
concurrency: Cluster.CONCURRENCY_PAGE,
maxConcurrency: 5,
puppeteerOptions: config,
timeout: 30000
})
return clusterInstance
} catch (err) {
console.log('Browser cluster initialization failed:', err.message)
}
}
The EACCES kill error persists despite these attempts. What could be causing this permission issue?
System Information:
- Operating System: Ubuntu 24.04 LTS
- Package versions: puppeteer v21.8.0, puppeteer-cluster v0.23.0
- Node.js: v18.x
- Browser: Chromium via apt package
Any suggestions for resolving this or additional debugging approaches would be helpful.