In chromedriver, in index.js script, function binPath with error in return, please fix it
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- tooling
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.
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
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
naver/egjs-flicking#971 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
RADAR-base/radar-self-enrolment-ui#118 ·
Maintainers usually reply within 1 day
-
Renderer treats a sub-pixel width difference as a resize, which cancels the `motion()` entranceOpen
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
triage-needed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MicrosoftDocs/edge-developer#3970 ·
Maintainers usually reply within 1 day
-
agent/scanner hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day