sitespeedio / sitespeedio/chromedriver
In chromedriver, in index.js script, function binPath with error in return, please fix it
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Have you read the documentation?
- Yes, I've read the how to make a reproducable bug guide
- Yes, I've read the how to debug my script guide
URL
I use local url, sorry can not repro
What are you trying to accomplish
in your code, binPath function never return driverPath for win32, linux and arm os:
binPath: function() {
let driverPath = path.resolve(__dirname, 'vendor', 'chromedriver');
if (os.platform() === 'win32') {
driverPath = driverPath + '.exe';
} else if (
(os.platform() === 'linux' && os.arch() === 'arm') ||
os.arch() === 'arm64'
) {
// Special handling for making it easy on Raspberry Pis
try {
const potentialChromdriverPath = execSync('which chromedriver');
if (potentialChromdriverPath !== undefined) {
return potentialChromdriverPath.toString().trim();
}
} catch (e) {
// Just swallow
}
} else {
return driverPath;
}
}
please fix to:
binPath: function() {
let driverPath = path.resolve(__dirname, 'vendor', 'chromedriver');
if (os.platform() === 'win32') {
driverPath = driverPath + '.exe';
} else if (
(os.platform() === 'linux' && os.arch() === 'arm') ||
os.arch() === 'arm64'
) {
// Special handling for making it easy on Raspberry Pis
try {
const potentialChromdriverPath = execSync('which chromedriver');
if (potentialChromdriverPath !== undefined) {
return potentialChromdriverPath.toString().trim();
}
} catch (e) {
// Just swallow
}
}
return driverPath;
}
What browser did you use?
Chrome
How to reproduce
any iteration
Relevant log output
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open index.js and inspect the chromedriver binPath function, focusing on the platform branches and their return paths. Exercise the function for Windows, Linux, and ARM platforms, and verify that it returns driverPath when no system chromedriver path is selected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100