Compare commits

...

4 Commits

Author SHA1 Message Date
25d191a95b 1.0.10 2019-11-16 00:01:07 +01:00
d5b3e48f8d fix(core): update 2019-11-16 00:01:05 +01:00
dd6f24551d 1.0.9 2019-11-15 23:59:35 +01:00
f4d0e9ad87 fix(core): update 2019-11-15 23:59:34 +01:00
3 changed files with 13 additions and 4 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartpuppeteer",
"version": "1.0.8",
"version": "1.0.10",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartpuppeteer",
"version": "1.0.8",
"version": "1.0.10",
"private": false,
"description": "simplified access to puppeteer",
"main": "dist/index.js",

View File

@@ -19,7 +19,7 @@ export const getEnvAwareBrowserInstance = async (
if ((process.env.CI || options.forceNoSandbox) && !smartenv.isWsl) {
chromeArgs = chromeArgs.concat([
'--no-sandbox',
'--disable-setuid-sandbox'
'--disable-setuid-sandbox',
// '--disable-dev-shm-usage'
]);
}
@@ -27,13 +27,22 @@ export const getEnvAwareBrowserInstance = async (
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'
]
});
}