-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Closed
Copy link
Labels
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
8.15.10
Node.js Version
v18.x
Mode
WDIO Testrunner
Which capabilities are you using?
{
browserName: "chrome",
goog:chromeOptions: {
binary: "path/to/executable/chromium/headless_shell"
}
}What happened?
When using webdriverio v8.15.10 with a headless Chromium browser, the @wdio/utils package attempts to fetch the Chrome version using the command cp.execSync("${chromePath}" --version").toString(). However, this command fails when running headless Chromium, resulting in the following error:
Error: Command failed: "/tmp/chromium/chromium" --version.
We also tried Chromium@118 provided from @puppeteer/browsers and the same error occurred.
What is your expected behavior?
Be able to talk to the browser.
How to reproduce the bug.
- Set up a project with
webdriveriov8.15.10 - Configure the project to use a headless Chromium browser
- Run a test
Relevant log output
Execution of 1 workers started at 2023-09-07T08:48:46.773Z
2023-09-07T08:48:49.861Z INFO @wdio/utils: Setting up browser driver for: chrome@stable
2023-09-07T08:48:49.946Z INFO @wdio/utils: Setting up browser binaries for: chrome@stable
[0907/084849.963224:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
2023-09-07T08:48:49.965Z INFO @wdio/local-runner: Shutting down spawned worker
2023-09-07T08:48:50.216Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-09-07T08:48:50.217Z INFO @wdio/local-runner: shutting down
"Error: Error: Command failed: ""/tmp/chromium/chromium"" --version"
[0907/084849.963224:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
at checkExecSyncError (node:child_process:885:11)
at Object.execSync (node:child_process:957:15)
at getBuildIdByChromePath (file:/path_to/node_modules/@wdio/utils/build/driver/utils.js:41:30)
at setupPuppeteerBrowser (file:/path_to/node_modules/@wdio/utils/build/driver/utils.js:86:19)
at async Promise.all (index 0)
at async Promise.all (index 1)
at async Launcher.run (file://path_to/node_modules/@wdio/cli/build/launcher.js:98:13)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
Reactions are currently unavailable