You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DadayanSamvel
changed the title
chromedriver index.js script function binPath with error in return, please fix it
In chromedriver, in index.js script, function binPath with error in return, please fix it
Feb 11, 2022
Hi @DadayanSamvel the reason is that the Chromedriver team do not provide a binary for those OS. You can ask https://bugs.chromium.org/p/chromedriver/issues/list them to add it. What OS are you using? On ARM there's a hack to use what the package finds using which, so you can install it with apt-get or what you are using.
Have you read the documentation?
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
Relevant log output
No response
The text was updated successfully, but these errors were encountered: