fix(core): update
This commit is contained in:
parent
41aefa7f18
commit
f4d0e9ad87
@ -19,21 +19,30 @@ export const getEnvAwareBrowserInstance = async (
|
||||
if ((process.env.CI || options.forceNoSandbox) && !smartenv.isWsl) {
|
||||
chromeArgs = chromeArgs.concat([
|
||||
'--no-sandbox',
|
||||
'--disable-setuid-sandbox'
|
||||
// '--disable-dev-shm-usage'
|
||||
'--disable-setuid-sandbox',
|
||||
'--disable-dev-shm-usage'
|
||||
]);
|
||||
}
|
||||
|
||||
let headlessBrowser: plugins.puppeteer.Browser;
|
||||
if (!smartenv.isWsl) {
|
||||
// lets get the actual instance
|
||||
console.log('launching puppeteer bundled chrome');
|
||||
headlessBrowser = await plugins.puppeteer.launch({
|
||||
args: chromeArgs
|
||||
});
|
||||
} else {
|
||||
console.log('Detected WSL. Using chromium.');
|
||||
headlessBrowser = await plugins.puppeteer.launch({
|
||||
executablePath: '/usr/bin/chromium-browser'
|
||||
args: [
|
||||
'--disable-gpu',
|
||||
'--disable-dev-shm-usage',
|
||||
'--disable-setuid-sandbox',
|
||||
'--no-first-run',
|
||||
'--no-sandbox',
|
||||
'--no-zygote',
|
||||
'--single-process'
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user