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

fix: Fix Chromedriver download for version 115+ #28

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

joeyparrish
Copy link
Member

Chrome has a new distribution system since version 115.

Chrome has a new distribution system since version 115.
chrome.js Outdated Show resolved Hide resolved
@@ -77,12 +95,32 @@ class ChromeWebDriverInstaller extends WebDriverInstallerBase {
* @return {!Promise}
*/
async install(driverVersion, outputDirectory) {
const majorVersion = parseInt(driverVersion.split('.')[0], 10);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit; parseInt(driverVersion.split('.')[0], 10) can be extracted to a function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseInt is already a function, right?

* @return {!Promise}
*/
async installNew_(majorVersion, driverVersion, outputDirectory) {
let platform;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 155-169 can be extracted to a getPlatform function

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the platform strings used in the old and new styles differ slightly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ex: Before 115, it was mac_arm64 for Arm and mac64 Intel. From 115 on, it's mac-arm64 and mac-x64.
Ex: Before 115, it was win32 for Windows. From 115 on, it's win64.

@joeyparrish joeyparrish changed the title fix: Update Chromedriver download mechanism fix: Fix Chromedriver download for version 115+ Aug 17, 2023
@joeyparrish joeyparrish merged commit 1d17e40 into shaka-project:main Aug 17, 2023
@joeyparrish joeyparrish deleted the new-chrome-distribution branch August 17, 2023 04:00
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Oct 16, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants