BotD
BotD copied to clipboard
False positive when browser internal pdf is enabled
In Edge and Chrome if the setting "Open PDF in Chrome/Edge" is enabled (Settings > Privacy and security > Site settings > Additional content settings > PDF documents.), then the value navigator.plugins is empty which evalute the bot test to true.
Tested and not currently fixed.
Tested and not currently fixed.
Can you make sure you are on the latest version? Also please, send me botd snapshot from playgrond https://fingerprintjs.github.io/BotD/main/
Hello,
Hre is the snapshot from the playground:
{"isError":false,"collectionTime":20.199999928474426,"detectionTime":21.299999952316284,"detectionResult":{"bot":true,"botKind":"headless_chrome"},"detectedBot":"headless_chrome","collectedData":{"process":{"state":-1,"error":"BotdError: window.process is undefined"},"userAgent":{"value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","state":0},"appVersion":{"value":"5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","state":0},"rtt":{"value":0,"state":0},"windowSize":{"value":{"outerWidth":2048,"outerHeight":1152,"innerWidth":2048,"innerHeight":1043},"state":0},"pluginsLength":{"value":0,"state":0},"pluginsArray":{"value":true,"state":0},"errorTrace":{"value":"TypeError: Cannot read properties of null (reading '0')\n at errorTrace (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:27921)\n/n) at n.
@TLeiter I added support for detecting edge as BrowserKind, so it should fix the issue
We are encountering the same problem using the playground on latest Chrome, Chrome 119, Chrome 116. Steps are the same as the issue author described.
Would you look into it again?
{
"isError": false,
"collectionTime": 45.8000000002794,
"detectionTime": 47.3000000002794,
"detectionResult": { "bot": true, "botKind": "headless_chrome" },
"detectedBot": "headless_chrome",
"collectedData": {
"process": {
"state": -1,
"error": "BotdError: window.process is undefined"
},
"android": { "value": false, "state": 0 },
"browserKind": { "value": "chrome", "state": 0 },
"browserEngineKind": { "value": "chromium", "state": 0 },
"documentFocus": { "value": true, "state": 0 },
"userAgent": {
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"state": 0
},
"appVersion": {
"value": "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"state": 0
},
"rtt": { "value": 100, "state": 0 },
"windowSize": {
"value": {
"outerWidth": 1920,
"outerHeight": 1040,
"innerWidth": 1920,
"innerHeight": 953
},
"state": 0
},
"pluginsLength": { "value": 0, "state": 0 },
"pluginsArray": { "value": true, "state": 0 },
"errorTrace": {
"value": "TypeError: Cannot read properties of null (reading '0')\n at errorTrace (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:45891)\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39573\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:38227\n at Object.next (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:38332)\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:37248\n at new Promise (<anonymous>)\n at e (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:36993)\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39410\n at Array.map (<anonymous>)\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39386",
"state": 0
},
"productSub": { "value": "20030107", "state": 0 },
"windowExternal": { "value": "[object External]", "state": 0 },
"mimeTypesConsistent": { "value": true, "state": 0 },
"evalLength": { "value": 33, "state": 0 },
"webGL": {
"value": { "vendor": "WebKit", "renderer": "WebKit WebGL" },
"state": 0
},
"webDriver": { "value": false, "state": 0 },
"languages": { "value": [["ru-RU"]], "state": 0 },
"documentElementKeys": { "value": ["lang"], "state": 0 },
"functionBind": {
"value": "function bind() { [native code] }",
"state": 0
},
"distinctiveProps": {
"value": {
"awesomium": false,
"cef": false,
"cefsharp": false,
"coachjs": false,
"fminer": false,
"geb": false,
"nightmarejs": false,
"phantomas": false,
"phantomjs": false,
"rhino": false,
"selenium": false,
"webdriverio": false,
"webdriver": false,
"headless_chrome": false
},
"state": 0
},
"notificationPermissions": { "value": false, "state": 0 }
},
"detectorsResults": {
"detectAppVersion": { "bot": false },
"detectDocumentAttributes": { "bot": false },
"detectErrorTrace": { "bot": false },
"detectEvalLengthInconsistency": { "bot": false },
"detectFunctionBind": { "bot": false },
"detectLanguagesLengthInconsistency": { "bot": false },
"detectNotificationPermissions": { "bot": false },
"detectPluginsArray": { "bot": false },
"detectPluginsLengthInconsistency": {
"bot": true,
"botKind": "headless_chrome"
},
"detectProcess": { "bot": false },
"detectUserAgent": { "bot": false },
"detectWebDriver": { "bot": false },
"detectWebGL": { "bot": false },
"detectWindowExternal": { "bot": false },
"detectWindowSize": { "bot": false },
"detectMimeTypesConsistent": { "bot": false },
"detectProductSub": { "bot": false },
"detectDistinctiveProperties": { "bot": false }
},
"debugData": {
"browserEngineKind": "chromium",
"browserKind": "chrome",
"browserVersion": { "major": 120, "minor": 0 },
"documentFocus": true,
"mozAppearanceSupport": false,
"isAndroid": false,
"isDesktopWebKit": false,
"isIPad": true
}
}
AnastasiaPlague
Of course.
If the user sets Download PDFs instead of Open PDFs in Chrome in Chrome, the length of the plugin array will be 0, causing a false positive for headless detection. any solutions?
I am also seeing a lot of false positives on the length of the Plugin array being 0. It appears the navigator.plugins array is deprecated anyways: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/plugins
Can this rule be removed for good?
I'm also running into this one as a user of one of the sites that use this lib, took me a while to figure out why, wish I knew that the lib has a playground :smile:
logs
{"isError":false,"collectionTime":7.300000000745058,"detectionTime":7.400000002235174,"detectionResult":{"bot":true,"botKind":"headless_chrome"},"detectedBot":"headless_chrome","collectedData":{"process":{"state":-1,"error":"BotdError: window.process is undefined"},"android":{"value":false,"state":0},"browserKind":{"value":"chrome","state":0},"browserEngineKind":{"value":"chromium","state":0},"documentFocus":{"value":true,"state":0},"userAgent":{"value":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36","state":0},"appVersion":{"value":"5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36","state":0},"rtt":{"value":50,"state":0},"windowSize":{"value":{"outerWidth":1920,"outerHeight":1051,"innerWidth":1920,"innerHeight":964},"state":0},"pluginsLength":{"value":0,"state":0},"pluginsArray":{"value":true,"state":0},"errorTrace":{"value":"TypeError: Cannot read properties of null (reading '0')\n at errorTrace (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:45891)\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39573\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:38227\n at Object.next (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:38332)\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:37248\n at new Promise (<anonymous>)\n at e (https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:36993)\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39410\n at Array.map (<anonymous>)\n at https://fingerprintjs.github.io/BotD/main/main.bundle.js:1:39386","state":0},"productSub":{"value":"20030107","state":0},"windowExternal":{"value":"[object External]","state":0},"mimeTypesConsistent":{"value":true,"state":0},"evalLength":{"value":33,"state":0},"webGL":{"value":{"vendor":"WebKit","renderer":"WebKit WebGL"},"state":0},"webDriver":{"value":false,"state":0},"languages":{"value":[["en-US"]],"state":0},"documentElementKeys":{"value":["lang"],"state":0},"functionBind":{"value":"function bind() { [native code] }","state":0},"distinctiveProps":{"value":{"awesomium":false,"cef":false,"cefsharp":false,"coachjs":false,"fminer":false,"geb":false,"nightmarejs":false,"phantomas":false,"phantomjs":false,"rhino":false,"selenium":false,"webdriverio":false,"webdriver":false,"headless_chrome":false},"state":0},"notificationPermissions":{"value":false,"state":0}},"detectorsResults":{"detectAppVersion":{"bot":false},"detectDocumentAttributes":{"bot":false},"detectErrorTrace":{"bot":false},"detectEvalLengthInconsistency":{"bot":false},"detectFunctionBind":{"bot":false},"detectLanguagesLengthInconsistency":{"bot":false},"detectNotificationPermissions":{"bot":false},"detectPluginsArray":{"bot":false},"detectPluginsLengthInconsistency":{"bot":true,"botKind":"headless_chrome"},"detectProcess":{"bot":false},"detectUserAgent":{"bot":false},"detectWebDriver":{"bot":false},"detectWebGL":{"bot":false},"detectWindowExternal":{"bot":false},"detectWindowSize":{"bot":false},"detectMimeTypesConsistent":{"bot":false},"detectProductSub":{"bot":false},"detectDistinctiveProperties":{"bot":false}},"debugData":{"browserEngineKind":"chromium","browserKind":"chrome","browserVersion":{"major":127,"minor":0},"documentFocus":true,"mozAppearanceSupport":false,"isAndroid":false,"isDesktopWebKit":false,"isIPad":true}}