-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
C-nodejsJavaScript BindingsJavaScript BindingsI-defectSomething is not working as intendedSomething is not working as intendedJ-awaiting answerQuestion asked of user; a reply moves it to triage againQuestion asked of user; a reply moves it to triage again
Description
What happened?
The jar file selenium-server-4.9.jar is placed in MacOS userdata which is /Users/<username>/Library/Application Support/<appname>/selenium-server/4.9.0/selenium-server.jar
, as we can see, there's a space in the path.
The space will break the ChildProcess.execSync
function which is used to detect the version of the jar file.
We suggest to change the following execSync function with execFileSync in selenium-webdriver/remote/util.js
:
// const execRes = cp.execSync(
// `${javaPath} -jar ${seleniumStandalonePath} --version`
// )
const execRes = cp.execFileSync(javaPath, ['-jar', seleniumStandalonePath, '--version'])
How can we reproduce the issue?
const seleniumPort = await detect(4852)
logger.info(`Starting up webdriver server on port ${seleniumPort}...`)
seleniumServer = new SeleniumServer(
join(userdataPath, 'selenium-server', package.dependencies['selenium-server'], 'selenium-server.jar'), {
jvmArgs: [
'-Dwebdriver.server.session.timeout=86400'
],
port: seleniumPort
})
await seleniumServer.start()
Relevant log output
Error: Command failed: /Users/<username>/Library/Application Support/<appname>/openjdk/1.8.0/bin/java -jar /Users/<username>/Library/Application Support/<appname>/selenium-server/4.9.0/selenium-server.jar --version
/bin/sh: /Users/<username>/Library/Application: No such file or directory
### Operating System
MacOS Big Sur 11.7.6
### Selenium version
4.9.0
### What are the browser(s) and version(s) where you see this issue?
N/A
### What are the browser driver(s) and version(s) where you see this issue?
N/A
### Are you using Selenium Grid?
_No response_
Metadata
Metadata
Assignees
Labels
C-nodejsJavaScript BindingsJavaScript BindingsI-defectSomething is not working as intendedSomething is not working as intendedJ-awaiting answerQuestion asked of user; a reply moves it to triage againQuestion asked of user; a reply moves it to triage again