diff --git a/1741898746177.jpg b/1741898746177.jpg new file mode 100644 index 0000000..ff8984d Binary files /dev/null and b/1741898746177.jpg differ diff --git a/index.js b/index.js index 5f0c020..8a79c71 100755 --- a/index.js +++ b/index.js @@ -37,13 +37,16 @@ const filename = argv.n || `${Date.now()}.jpg`; { // executablePath: '/usr/bin/google-chrome-stable', // Use real Chrome if available -stable for ARCH derivative like Garuda linux (my os) // executablePath: '/usr/bin/firefox', // Adjust based on `which firefox` - headless: false, + headless: 'new', // Use the newer headless mode args: [ - '--disable-blink-features=AutomationControlled', - '--no-sandbox', - '--disable-setuid-sandbox', - '--disable-infobars', - '--disable-dev-shm-usage' + '--use-gl=swiftshader', // Enables WebGL rendering + '--enable-webgl', // Ensures WebGL is enabled + '--ignore-gpu-blocklist', // Prevents GPU restrictions + '--disable-software-rasterizer', // Helps with WebGL rendering + '--disable-gpu', // Ensures it runs properly in headless mode + '--disable-dev-shm-usage', // Prevents crashes in Docker/Linux + '--no-sandbox', // Helps in some environments + '--disable-setuid-sandbox' ] } );