Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In chromedriver, in index.js script, function binPath with error in return, please fix it #8

Open
2 tasks done
DadayanSamvel opened this issue Feb 11, 2022 · 2 comments

Comments

@DadayanSamvel
Copy link

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

any iteration

Relevant log output

No response

@DadayanSamvel 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
@soulgalore soulgalore removed the bug label Feb 12, 2022
@soulgalore soulgalore transferred this issue from sitespeedio/sitespeed.io Feb 12, 2022
@soulgalore
Copy link
Member

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.

@DadayanSamvel
Copy link
Author

DadayanSamvel commented Feb 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants