selenium icon indicating copy to clipboard operation
selenium copied to clipboard

chromedriver.cmd fails to launch with newer nodejs versions[🐛 Bug]:

Open benm071 opened this issue 1 year ago • 5 comments

What happened?

Trying to use selenium-webdriver against chrome instances fails to launch chromedriver.cmd and thus chrome for testing when run on Windows 11 against newer nodejs instances (such as 18.20.2) due to a security patch made in nodejs that prevents spawn/spawnSync from launching .cmd or .bat without { shell: true }

See https://github.com/nodejs/node/issues/52681 for example

How can we reproduce the issue?

Try to run any nodejs based test script using chrome/chromedriver on a Windows system with one of the security-patched nodes.  chromedriver.cmd will never launch because it fails internally to selenium-webdriver with a node EINVAL error (which is eaten and never displayed)

Relevant log output

No output

Operating System

Windows 11

Selenium version

4.23.0

What are the browser(s) and version(s) where you see this issue?

Chrome 127

What are the browser driver(s) and version(s) where you see this issue?

chromdriver 127.x

Are you using Selenium Grid?

No

benm071 avatar Aug 07 '24 17:08 benm071

@benm071, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

github-actions[bot] avatar Aug 07 '24 17:08 github-actions[bot]

This issue is looking for contributors.

Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.

github-actions[bot] avatar Aug 07 '24 19:08 github-actions[bot]

Hi @benm071,

Thank you for raising the issue.

I wasn’t able to reproduce it with the provided configuration (Windows 11, Node.js versions 18.20.2 and 20.16.0 LTS, Selenium WebDriver 4.23.0).

You can find the repo here: https://github.com/harsha509/issue-14353.

If the issue persists, could you please provide a Short, Self-Contained, Correct (Compilable) Example to help us investigate further?

Thanks, Sri

harsha509 avatar Aug 08 '24 07:08 harsha509

Hi @benm071,

Thank you for raising the issue.

I wasn’t able to reproduce it with the provided configuration (Windows 11, Node.js versions 18.20.2 and 20.16.0 LTS, Selenium WebDriver 4.23.0).

You can find the repo here: https://github.com/harsha509/issue-14353.

If the issue persists, could you please provide a Short, Self-Contained, Correct (Compilable) Example to help us investigate further?

Thanks, Sri

Hi, I have to reignite this issue as it is not working.

I reran your tests and they fail the same as mine.

image

I am running:

  • Node 18.17.1
  • selenium-webdriver: 4.23.0
  • Chrome: 127.0.6533.120 (Official Build) (64-bit)

zlatinejc avatar Aug 19 '24 11:08 zlatinejc

Does the issue still persists?

Delta456 avatar Oct 15 '24 08:10 Delta456

I will close this as the issue has not had any more activity.

diemol avatar Nov 05 '24 11:11 diemol

This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Dec 05 '24 22:12 github-actions[bot]