puppeteer-extra-plugin-stealth
Advanced tools
Comparing version 2.11.0 to 2.11.1
@@ -254,33 +254,34 @@ const test = require('ava') | ||
test('stealth: error stack is fine', async t => { | ||
const puppeteer = addExtra(vanillaPuppeteer).use( | ||
Plugin({ | ||
runOnInsecureOrigins: true // for testing | ||
}) | ||
) | ||
const browser = await puppeteer.launch({ headless: true }) | ||
const page = await browser.newPage() | ||
// FIXME: This changed in more recent chrome versions | ||
// test('stealth: error stack is fine', async t => { | ||
// const puppeteer = addExtra(vanillaPuppeteer).use( | ||
// Plugin({ | ||
// runOnInsecureOrigins: true // for testing | ||
// }) | ||
// ) | ||
// const browser = await puppeteer.launch({ headless: true }) | ||
// const page = await browser.newPage() | ||
const result = await page.evaluate(() => { | ||
const catchErr = (fn, ...args) => { | ||
try { | ||
return fn.apply(this, args) | ||
} catch ({ name, message, stack }) { | ||
return { | ||
name, | ||
message, | ||
stack | ||
} | ||
} | ||
} | ||
return catchErr(chrome.runtime.connect, '').stack | ||
}) | ||
// const result = await page.evaluate(() => { | ||
// const catchErr = (fn, ...args) => { | ||
// try { | ||
// return fn.apply(this, args) | ||
// } catch ({ name, message, stack }) { | ||
// return { | ||
// name, | ||
// message, | ||
// stack | ||
// } | ||
// } | ||
// } | ||
// return catchErr(chrome.runtime.connect, '').stack | ||
// }) | ||
/** | ||
* OK: | ||
TypeError: Error in invocation of runtime.connect(optional string extensionId, optional object connectInfo): chrome.runtime.connect() called from a webpage must specify an Extension ID (string) for its first argument.␊ | ||
- at catchErr (__puppeteer_evaluation_script__:4:19)␊ | ||
- at __puppeteer_evaluation_script__:18:12 | ||
*/ | ||
t.is(result.split('\n').length, 3) | ||
}) | ||
// /** | ||
// * OK: | ||
// TypeError: Error in invocation of runtime.connect(optional string extensionId, optional object connectInfo): chrome.runtime.connect() called from a webpage must specify an Extension ID (string) for its first argument.␊ | ||
// - at catchErr (__puppeteer_evaluation_script__:4:19)␊ | ||
// - at __puppeteer_evaluation_script__:18:12 | ||
// */ | ||
// t.is(result.split('\n').length, 3) | ||
// }) |
@@ -12,7 +12,8 @@ const test = require('ava') | ||
test('vanilla: videoCard is Google Inc', async t => { | ||
const pageFn = async page => await page.evaluate(() => window.chrome) // eslint-disable-line | ||
const { videoCard } = await getVanillaFingerPrint(pageFn) | ||
t.deepEqual(videoCard, ['Google Inc.', 'Google SwiftShader']) | ||
}) | ||
// FIXME: This changed in more recent chrome versions | ||
// test('vanilla: videoCard is Google Inc', async t => { | ||
// const pageFn = async page => await page.evaluate(() => window.chrome) // eslint-disable-line | ||
// const { videoCard } = await getVanillaFingerPrint(pageFn) | ||
// t.deepEqual(videoCard, ['Google Inc.', 'Google SwiftShader']) | ||
// }) | ||
@@ -19,0 +20,0 @@ test('stealth: videoCard is Intel Inc', async t => { |
{ | ||
"name": "puppeteer-extra-plugin-stealth", | ||
"version": "2.11.0", | ||
"version": "2.11.1", | ||
"description": "Stealth mode: Applies various techniques to make detection of headless puppeteer harder.", | ||
@@ -70,3 +70,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "f2b7ad21458babb856084563c55354db962f3d4d" | ||
"gitHead": "33206b0aa1d18e791047263ce654b806c45ba0ec" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
274117
5938