From 3cb949b3811c3ed95f7eb8d1b5f39a612599ef01 Mon Sep 17 00:00:00 2001 From: DeNNiiInc Date: Sat, 27 Dec 2025 23:47:36 +1100 Subject: [PATCH] Add debug script --- debug-chrome.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 debug-chrome.js diff --git a/debug-chrome.js b/debug-chrome.js new file mode 100644 index 0000000..be809f7 --- /dev/null +++ b/debug-chrome.js @@ -0,0 +1,26 @@ +const chromeLauncher = require('chrome-launcher'); + +(async () => { + console.log('Attempting to launch Chrome directly...'); + const chromePath = '/usr/bin/chromium'; + console.log(`Using path: ${chromePath}`); + + try { + const chrome = await chromeLauncher.launch({ + chromeFlags: ['--headless', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'], + chromePath: chromePath + }); + console.log('SUCCESS: Chrome launched!'); + console.log('Port:', chrome.port); + console.log('PID:', chrome.pid); + + setTimeout(async () => { + await chrome.kill(); + console.log('Chrome killed. Exiting.'); + }, 2000); + } catch (e) { + console.error('FAILURE: Chrome failed to launch.'); + console.error(e); + console.error(JSON.stringify(e, null, 2)); + } +})();