-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Building /src/Components via /src/Components $ ./build.sh fails on a Mac M1 in selenium-standalone due to a recent-ish change to the ARM64-based chromedriver archive's filename convention on the Chromium distribution site.
The first clue was a download failure at some point (possibly during dependency restore when I first opened the project) on https://chromedriver.storage.googleapis.com/108.0.5359.71/chromedriver_mac64_m1.zip, which I cannot for the life of me find in my build logs.
However, this error now repros reliably on every /src/Components $ ./build.sh execution because the script tries to chmod a nonexistent chromedriver archive:
-----
selenium-standalone installation finished
-----
/Users/mmacy/repos/aspnetcore/src/Shared/E2ETesting/E2ETesting.targets(23,5): error : in "chmod". [/Users/mmacy/repos/aspnetcore/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]
See more details below:
ENOENT: no such file or directory, chmod '/Users/mmacy/repos/aspnetcore/src/Components/test/E2ETest/node_modules/selenium-standalone/.selenium/chromedriver/108.0.5359.71-arm64/chromedriver'
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: ENOENT: no such file or directory, chmod '/Users/mmacy/repos/aspnetcore/src/Components/test/E2ETest/node_modules/selenium-standalone/.selenium/chromedriver/108.0.5359.71-arm64/chromedriver'] {
errno: -2,
code: 'ENOENT',
syscall: 'chmod',
path: '/Users/mmacy/repos/aspnetcore/src/Components/test/E2ETest/node_modules/selenium-standalone/.selenium/chromedriver/108.0.5359.71-arm64/chromedriver'
}
Node.js v19.3.0
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
/Users/mmacy/repos/aspnetcore/src/Shared/E2ETesting/E2ETesting.targets(23,5): error : Command failed with exit code 1. [/Users/mmacy/repos/aspnetcore/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj]Expected Behavior
Executing /src/Components $ ./build.sh should download all the project's dependencies including those dependencies' dependencies, and complete successfully.
Steps To Reproduce
- On a Mac M1 machine, follow the steps in BuildFromSource.md to prepare your local build environment.
- Execute the /src/Components/build.sh script.
Exceptions (if any)
No response
.NET Version
8.0.100-alpha.1.22531.1
Anything else?
As of version 106.0.5249.61, the filename suffix for the ARM64-based chromedriver ZIP archive changed. The change causes the version of selenium-standalone used by the current build config to fail to download the archive.
- Old format (106.0.5249.21):
chromedriver_mac64_m1.zip - New format (106.0.5249.61:
chromedriver_mac_arm64.zip
The compute-download-urls.js file in the version of selenium-standalone used by the current aspnetcore build/test toolchain does not accommodate the new chromedriver filename convention:
// Busted version - from selenium-standalone in current build/test toolchain
platform = 'mac64' + (process.arch === 'arm64' ? '_m1' : '');The upstream selenium-standalone repo includes a fix for this in the current compute-download-urls.js:
// Fixed in upstream selenium-standalone repo
platform = parseInt(major, 10) > 105 ? 'mac_arm64' : 'mac64_m1';Happy to provide more information if you need it, just say the word. 🙂
ℹ️ To get unblocked, M1 Mac users can manually download and extract the right
chromedriverto the expected location.