Open M1n007 opened 1 year ago
Have you tried args: [ '--no-sandbox' ]
?
Check that a good version of chrome is being found by chrome-paths. If you have multiple chrome, maybe it is finding an old or corrupt one?
Try chromium -> chromePaths?.Chromium
Try edge-paths -> getEdgePath() (will work under Linux)
it's puppeteer issue, check puppeteer repo issues can be something in them related to this one.
I try to running a puppeteer-cluster on my windows 10 and nodejs 18, show error :
`` throw new Error(
Unable to launch browser, error message: ${err.message}`); ^Error: Unable to launch browser, error message: Failed to launch the browser process! [0110/004354.813:ERROR:icu_util.cc(243)] Invalid file descriptor to ICU data received. [0110/004354.813:FATAL:icu_util.cc(312)] Check failed: result. Backtrace: IsSandboxedProcess [0x00007FFE5146D0D2+1346194] IsSandboxedProcess [0x00007FFE520D0DE2+14337954] IsSandboxedProcess [0x00007FFE513EF1B2+830322] IsSandboxedProcess [0x00007FFE513F0600+835520] IsSandboxedProcess [0x00007FFE51627AEB+3159211] CrashForExceptionInNonABICompliantCodeRange [0x00007FFE512D94F3+28949299] CrashForExceptionInNonABICompliantCodeRange [0x00007FFE512D87B9+28945913] CrashForExceptionInNonABICompliantCodeRange [0x00007FFE512D895E+28946334] CrashForExceptionInNonABICompliantCodeRange [0x00007FFE51321DA7+29246439] CrashForExceptionInNonABICompliantCodeRange [0x00007FFE51321C65+29246117] CrashForExceptionInNonABICompliantCodeRange [0x00007FFE51321A43+29245571] ChromeMain [0x00007FFE4DD21257+439] GetPakFileHashes [0x00007FF6B33D29EA+6634] GetPakFileHashes [0x00007FF6B33D1AA1+2721] GetHandleVerifier [0x00007FF6B354ACF2+910370] BaseThreadInitThunk [0x00007FFEEB317614+20] RtlUserThreadStart [0x00007FFEEC8426A1+33]
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
Node.js v18.13.0```
this my sample code
`const puppeteer = require('puppeteer-extra'); const StealthPlugin = require('puppeteer-extra-plugin-stealth'); puppeteer.use(StealthPlugin()); const AdblockerPlugin = require('puppeteer-extra-plugin-adblocker'); puppeteer.use(AdblockerPlugin({ blockTrackers: true })); const { Cluster } = require('puppeteer-cluster');
const chromePaths = require('chrome-paths');
const fs = require('fs'); const moment = require('moment'); const chalk = require('chalk'); const delay = require('delay'); const readlineSync = require('readline-sync'); const cheerio = require('cheerio'); const async = require('async');
const os = require('os');
if (os.platform().toLowerCase().includes('win')) { if (fs.existsSync('./node_modules/puppeteer-extra-plugin-user-data-dir/index.js')) { let confData = fs.readFileSync('./node_modules/puppeteer-extra-plugin-user-data-dir/index.js', 'utf8'); if (!confData.includes('!this._userDataDir')) { confData = confData.replace(/deleteUserDataDir()\s{[\s\S]?}/, `deleteUserDataDir() { debug('removeUserDataDir', this._userDataDir)
}
function getString(start, end, all) { const regex = new RegExp(
${start}(.*?)${end}
); const str = all const result = regex.exec(str); return result; }const inputValue = async (page, selector, value) => { await page.waitForSelector(selector); let inputUsername = await page.$(selector); await inputUsername.click({ clickCount: 3 }); await page.keyboard.type(value) return ''; };
(async () => {
})()`