webdriverio: [🐛 Bug]: `@wdio/devtools-service` support for Selenoid
Environment (please complete the following information):
- WebdriverIO version: 7.9.1
- Mode: WDIO Testrunner
- If WDIO Testrunner, running sync/async: async
- Node.js version: 14.17.6
- NPM version: 6.14.15
- Browser name and version: Chrome 91
- Platform name and version: Mac OS Big Sur
- Additional wdio packages used (if applicable): @wdio/devtools-service v7.9.1
Config of WebdriverIO
...
hostname: '10.0.x.y',
port: 4444,
path: '/wd/hub',
....
// Test runner services
// Services take over a specific job you don't want to take care of. They enhance
// your test setup with almost no effort. Unlike plugins, they don't add new
// commands. Instead, they hook themselves up into the test process.
services: ['devtools', 'rerun'],
...
capabilities: [
{
browserName: 'chrome',
'selenoid:options': { enableVNC: true, enableVideo: false, hostsEntries },
},
],
...
],
Describe the bug
After the devtool service activation, error messages like this:
[0-0] 2021-10-08T07:49:55.455Z ERROR @wdio/utils:shim: SyntaxError: Unexpected token Y in JSON at position 0
[0-0] at JSON.parse (<anonymous>)
[0-0] at IncomingMessage.<anonymous> (/***************/e2e-wd/node_modules/lighthouse/lighthouse-core/gather/connections/cri.js:97:28)
[0-0] at IncomingMessage.emit (events.js:412:35)
[0-0] at IncomingMessage.emit (domain.js:470:12)
[0-0] at endReadableNT (internal/streams/readable.js:1317:12)
[0-0] at processTicksAndRejections (internal/process/task_queues.js:82:21)
[0-0] Error in "AfterHook Hook"
Unexpected token Y in JSON at position 0
started to appear in the output. I checked the actual request and it indeed attempts to read JSON at http://10.0.x.y:4444/json/list. The problem is that this endpoint responds with plaintext You are using Selenoid 1.10.5!.
It does not affect the execution of the tests though.
To Reproduce Steps to reproduce the behavior:
- Use wdio with almost default configuration with
hostnamepointing to a Selenoid cluster entry point.
Expected behavior No error messages should appear in the logs.
Log
See an example error message above.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (12 by maintainers)
@christian-bromann nope. it is our bug. see https://github.com/webdriverio/webdriverio/issues/7530#issuecomment-938469999
We try to connect to
ws://10.10.10.1:4444/json/listwhen the correct url isws://10.10.10.1:4444/devtools/69582fa0cf807667e455ad767eb9a012/json/list