webdriverio: [🐛 Bug]: Wdio tries to download the chromedriver eventhough i have given a custompath
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
8.16.0
Node.js Version
20.5.0
Mode
WDIO Testrunner
Which capabilities are you using?
capabilities: [{
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
// grid with only 5 firefox instances available you can make sure that not more than
// 5 instances get started at a time.
maxInstances: 1,
//
browserName: 'chrome',
'goog:chromeOptions': {
binary: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
extensions: [chromeModheader.getEncodedExtension()],
excludeSwitches: [
'--enable-automation'
],
args: ['--remote-debugging-port=9222']
},
'wdio:devtoolsOptions': {
ignoreDefaultArgs: true
},
acceptInsecureCerts: true,
// If outputDir is provided WebdriverIO can capture driver session logs
// it is possible to configure which logTypes to include/exclude.
// excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs
// excludeDriverLogs: ['bugreport', 'server'],
}],
services: [['chromedriver', {
logFileName: 'wdio-chromedriver.log', // default
outputDir: 'driver-logs', // overwrites the config.outputDir
args: ['--silent'],
chromedriverCustomPath: '/Users/s7577413/Documents/DriverFolder/chromedriver-mac-x64/chromedriver'
}]],
What happened?
I am trying to run a spec file in mocha framework wdio.
2023-09-07T04:51:16.186Z INFO chromedriver: Initiate Chromedriver Launcher (v8.1.1)
2023-09-07T04:51:16.186Z INFO @wdio/cli:launcher: Run onPrepare hook
2023-09-07T04:51:16.187Z INFO chromedriver: Start Chromedriver (/Users/s7577413/Documents/DriverFolder/chromedriver-mac-x64/chromedriver) with args --silent --port=9515 --url-base=/
2023-09-07T04:51:16.298Z INFO @wdio/utils: Setting up browser driver for: chrome@stable
2023-09-07T04:51:16.300Z INFO @wdio/utils: Setting up browser binaries for: chrome@stable
2023-09-07T04:51:16.445Z INFO webdriver: Downloading Chromedriver v116.0.5845.179
2023-09-07T04:52:31.744Z WARN webdriver: Couldn’t download Chromedriver v116.0.5845.179: , trying to find known good version…
(node:91512) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)
(node:91512) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:91512) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
2023-09-07T04:56:25.242Z INFO @wdio/local-runner: Shutting down spawned worker
2023-09-07T04:56:25.494Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-09-07T04:56:25.495Z INFO @wdio/local-runner: shutting down
RequestError: RequestError
at ClientRequest.<anonymous> (file:///Users/s7577413/Documents/ProjectFiles/Automation/WDIO/test-automation-ui/node_modules/@wdio/utils/node_modules/got/dist/source/core/index.js:792:107)
at Object.onceWrapper (node:events:629:26)
at ClientRequest.emit (node:events:526:35)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:495:9)
at TLSSocket.emit (node:events:514:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError
at internalConnectMultiple (node:net:1114:18)
at afterConnectMultiple (node:net:1667:5)
RequestError
at ClientRequest.<anonymous> (file:///Users/s7577413/Documents/ProjectFiles/Automation/WDIO/test-automation-ui/node_modules/@wdio/utils/node_modules/got/dist/source/core/index.js:792:107)
at Object.onceWrapper (node:events:629:26)
at ClientRequest.emit (node:events:526:35)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:495:9)
at TLSSocket.emit (node:events:514:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError
at internalConnectMultiple (node:net:1114:18)
at afterConnectMultiple (node:net:1667:5) {
input: undefined,
code: ‘ETIMEDOUT’,
timings: {
start: 1694062508476,
socket: 1694062508476,
lookup: 1694062508477,
connect: undefined,
secureConnect: undefined,
upload: undefined,
response: undefined,
end: undefined,
error: 1694062585241,
abort: undefined,
phases: {
wait: 0,
dns: 1,
tcp: undefined,
tls: undefined,
request: undefined,
firstByte: undefined,
download: undefined,
total: 76765
}
},
options: {
request: undefined,
agent: { http: undefined, https: undefined, http2: undefined },
h2session: undefined,
decompress: true,
timeout: {
connect: undefined,
lookup: undefined,
read: undefined,
request: undefined,
response: undefined,
secureConnect: undefined,
send: undefined,
socket: undefined
},
prefixUrl: ‘’,
body: undefined,
form: undefined,
json: undefined,
cookieJar: undefined,
ignoreInvalidCookies: false,
searchParams: undefined,
dnsLookup: undefined,
dnsCache: undefined,
context: {},
hooks: {
init: [],
beforeRequest: [],
beforeError: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: []
},
followRedirect: true,
maxRedirects: 10,
cache: undefined,
throwHttpErrors: true,
username: ‘’,
password: ‘’,
http2: false,
allowGetBody: false,
headers: {
‘user-agent’: ‘got (https://github.com/sindresorhus/got)’,
accept: ‘application/json’,
‘accept-encoding’: ‘gzip, deflate, br’
},
methodRewriting: false,
dnsLookupIpVersion: undefined,
parseJson: [Function: parse],
stringifyJson: [Function: stringify],
retry: {
limit: 2,
methods: [ ‘GET’, ‘PUT’, ‘HEAD’, ‘DELETE’, ‘OPTIONS’, ‘TRACE’ ],
statusCodes: [
408, 413, 429, 500,
502, 503, 504, 521,
522, 524
],
errorCodes: [
‘ETIMEDOUT’,
‘ECONNRESET’,
‘EADDRINUSE’,
‘ECONNREFUSED’,
‘EPIPE’,
‘ENOTFOUND’,
‘ENETUNREACH’,
‘EAI_AGAIN’
],
maxRetryAfter: undefined,
calculateDelay: [Function: calculateDelay],
backoffLimit: Infinity,
noise: 100
},
localAddress: undefined,
method: ‘GET’,
createConnection: undefined,
cacheOptions: {
shared: undefined,
cacheHeuristic: undefined,
immutableMinTimeToLive: undefined,
ignoreCargoCult: undefined
},
https: {
alpnProtocols: undefined,
rejectUnauthorized: undefined,
checkServerIdentity: undefined,
certificateAuthority: undefined,
key: undefined,
certificate: undefined,
passphrase: undefined,
pfx: undefined,
ciphers: undefined,
honorCipherOrder: undefined,
minVersion: undefined,
maxVersion: undefined,
signatureAlgorithms: undefined,
tlsSessionLifetime: undefined,
dhparam: undefined,
ecdhCurve: undefined,
certificateRevocationLists: undefined
},
encoding: undefined,
resolveBodyOnly: false,
isStream: false,
responseType: ‘text’,
url: URL {
href: ‘https://googlechromelabs.github.io/chrome-for-testing/known-good-versions.json’,
origin: ‘https://googlechromelabs.github.io’,
protocol: ‘https:’,
username: ‘’,
password: ‘’,
host: ‘googlechromelabs.github.io’,
hostname: ‘googlechromelabs.github.io’,
port: ‘’,
pathname: ‘/chrome-for-testing/known-good-versions.json’,
search: ‘’,
searchParams: URLSearchParams {},
hash: ‘’
},
pagination: {
transform: [Function: transform],
paginate: [Function: paginate],
filter: [Function: filter],
shouldContinue: [Function: shouldContinue],
countLimit: Infinity,
backoff: 0,
requestLimit: 10000,
stackAllItems: false
},
setHost: true,
maxHeaderSize: undefined,
signal: undefined,
enableUnixSockets: false
}
}
Waiting for the debugger to disconnect…
Waiting for the debugger to disconnect…
s7577413@C02DFC39MD6M test-automation-ui % npm run cli_noproducthko_wdio
What is your expected behavior?
I expect the wdio to not download chromedriver and just run the custompath driver.
How to reproduce the bug.
“devDependencies”: { “@types/global-agent”: “^2.1.1”, “@wdio/allure-reporter”: “^8.15.10”, “@wdio/browserstack-service”: “^8.16.0”, “@wdio/cli”: “^8.16.0”, “@wdio/devtools-service”: “^8.15.10”, “@wdio/dot-reporter”: “^8.15.10”, “@wdio/local-runner”: “^8.10.7”, “@wdio/mocha-framework”: “^8.10.7”, “@wdio/spec-reporter”: “^8.10.6”, “allure-commandline”: “^2.21.0”, “chai”: “^4.3.7”, “global-agent”: “^3.0.0”, “wdio-chromedriver-service”: “^8.1.1”, “wdio-intercept-service”: “^4.4.0” }, “dependencies”: { “@wdio/junit-reporter”: “^8.15.10”, “child_process”: “1.0.2”, “chrome-modheader”: “^2.0.6”, “dotenv”: “^16.0.3”, “puppeteer”: “^21.1.0”, “wdio”: “^6.0.1”, “wdio-browserstack-reporter”: “^1.0.1”, “webdriverio”: “^8.16.0” }
and use the above capabilities to the default conf file of wdio.
Relevant log output
2023-09-07T04:51:16.298Z INFO @wdio/utils: Setting up browser driver for: chrome@stable
2023-09-07T04:51:16.300Z INFO @wdio/utils: Setting up browser binaries for: chrome@stable
2023-09-07T04:51:16.445Z INFO webdriver: Downloading Chromedriver v116.0.5845.179
2023-09-07T04:52:31.744Z WARN webdriver: Couldn't download Chromedriver v116.0.5845.179: , trying to find known good version...
(node:91512) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:91512) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:91512) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
2023-09-07T04:56:25.242Z INFO @wdio/local-runner: Shutting down spawned worker
2023-09-07T04:56:25.494Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-09-07T04:56:25.495Z INFO @wdio/local-runner: shutting down
RequestError: RequestError
at ClientRequest.<anonymous> (file:///Users/s7577413/Documents/ProjectFiles/Automation/WDIO/test-automation-ui/node_modules/@wdio/utils/node_modules/got/dist/source/core/index.js:792:107)
at Object.onceWrapper (node:events:629:26)
at ClientRequest.emit (node:events:526:35)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:495:9)
at TLSSocket.emit (node:events:514:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError
at internalConnectMultiple (node:net:1114:18)
at afterConnectMultiple (node:net:1667:5)
RequestError
at ClientRequest.<anonymous> (file:///Users/s7577413/Documents/ProjectFiles/Automation/WDIO/test-automation-ui/node_modules/@wdio/utils/node_modules/got/dist/source/core/index.js:792:107)
at Object.onceWrapper (node:events:629:26)
at ClientRequest.emit (node:events:526:35)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:495:9)
at TLSSocket.emit (node:events:514:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError
at internalConnectMultiple (node:net:1114:18)
at afterConnectMultiple (node:net:1667:5) {
input: undefined,
code: 'ETIMEDOUT',
timings: {
start: 1694062508476,
socket: 1694062508476,
lookup: 1694062508477,
connect: undefined,
secureConnect: undefined,
upload: undefined,
response: undefined,
end: undefined,
error: 1694062585241,
abort: undefined,
phases: {
wait: 0,
dns: 1,
tcp: undefined,
tls: undefined,
request: undefined,
firstByte: undefined,
download: undefined,
total: 76765
}
},
options: {
request: undefined,
agent: { http: undefined, https: undefined, http2: undefined },
h2session: undefined,
decompress: true,
timeout: {
connect: undefined,
lookup: undefined,
read: undefined,
request: undefined,
response: undefined,
secureConnect: undefined,
send: undefined,
socket: undefined
},
prefixUrl: '',
body: undefined,
form: undefined,
json: undefined,
cookieJar: undefined,
ignoreInvalidCookies: false,
searchParams: undefined,
dnsLookup: undefined,
dnsCache: undefined,
context: {},
hooks: {
init: [],
beforeRequest: [],
beforeError: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: []
},
followRedirect: true,
maxRedirects: 10,
cache: undefined,
throwHttpErrors: true,
username: '',
password: '',
http2: false,
allowGetBody: false,
headers: {
'user-agent': 'got (https://github.com/sindresorhus/got)',
accept: 'application/json',
'accept-encoding': 'gzip, deflate, br'
},
methodRewriting: false,
dnsLookupIpVersion: undefined,
parseJson: [Function: parse],
stringifyJson: [Function: stringify],
retry: {
limit: 2,
methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
statusCodes: [
408, 413, 429, 500,
502, 503, 504, 521,
522, 524
],
errorCodes: [
'ETIMEDOUT',
'ECONNRESET',
'EADDRINUSE',
'ECONNREFUSED',
'EPIPE',
'ENOTFOUND',
'ENETUNREACH',
'EAI_AGAIN'
],
maxRetryAfter: undefined,
calculateDelay: [Function: calculateDelay],
backoffLimit: Infinity,
noise: 100
},
localAddress: undefined,
method: 'GET',
createConnection: undefined,
cacheOptions: {
shared: undefined,
cacheHeuristic: undefined,
immutableMinTimeToLive: undefined,
ignoreCargoCult: undefined
},
https: {
alpnProtocols: undefined,
rejectUnauthorized: undefined,
checkServerIdentity: undefined,
certificateAuthority: undefined,
key: undefined,
certificate: undefined,
passphrase: undefined,
pfx: undefined,
ciphers: undefined,
honorCipherOrder: undefined,
minVersion: undefined,
maxVersion: undefined,
signatureAlgorithms: undefined,
tlsSessionLifetime: undefined,
dhparam: undefined,
ecdhCurve: undefined,
certificateRevocationLists: undefined
},
encoding: undefined,
resolveBodyOnly: false,
isStream: false,
responseType: 'text',
url: URL {
href: 'https://googlechromelabs.github.io/chrome-for-testing/known-good-versions.json',
origin: 'https://googlechromelabs.github.io',
protocol: 'https:',
username: '',
password: '',
host: 'googlechromelabs.github.io',
hostname: 'googlechromelabs.github.io',
port: '',
pathname: '/chrome-for-testing/known-good-versions.json',
search: '',
searchParams: URLSearchParams {},
hash: ''
},
pagination: {
transform: [Function: transform],
paginate: [Function: paginate],
filter: [Function: filter],
shouldContinue: [Function: shouldContinue],
countLimit: Infinity,
backoff: 0,
requestLimit: 10000,
stackAllItems: false
},
setHost: true,
maxHeaderSize: undefined,
signal: undefined,
enableUnixSockets: false
}}
Code of Conduct
- I agree to follow this project’s Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (19 by maintainers)
Try have WebdriverIO set up the browser for you via: