Closed jgresham closed 9 months ago
If I understand correctly, you're asking two questions:
I'm not sure about the repo but I can help list the versions of Electron that shipped with ChromeDriver for Mac on ARM. The electron/electron Releases include assets like chromedriver-{tag}-darwin-arm64.zip. It's pretty quick to use the GitHub gh
CLI tool to use the API and look for that file. In pseudocode:
For each release starting from v29 and working backwards:
Find the release ID by tag name
List the assets by release ID
And filter down to only include chromedriver-<tag>-darwin-arm64.zip
If it doesn't include the file, break
What does that look like?
#!/bin/bash
owner=electron
repo=electron
for majorVersion in $(seq 29 -1 0); do
tag="v${majorVersion}.0.0"
# Get release by tag name
# https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-a-release-by-tag-name
#
# Extract the "id" field using jq.
release_id=$( gh api "/repos/${owner}/${repo}/releases/tags/${tag}" | jq -r '.id' )
# List release assets
# https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#list-release-assets
#
# Print the assets that include chromedriver-{tag}-darwin-arm64.zip.
if ! gh api "/repos/${owner}/${repo}/releases/${release_id}/assets" | jq -r 'map(.name) | .[]' | grep "chromedriver-${tag}-darwin-arm64.zip"; then
break
fi
done
This outputs the following
chromedriver-v29.0.0-darwin-arm64.zip
chromedriver-v28.0.0-darwin-arm64.zip
chromedriver-v27.0.0-darwin-arm64.zip
chromedriver-v26.0.0-darwin-arm64.zip
chromedriver-v25.0.0-darwin-arm64.zip
chromedriver-v24.0.0-darwin-arm64.zip
chromedriver-v23.0.0-darwin-arm64.zip
chromedriver-v22.0.0-darwin-arm64.zip
chromedriver-v21.0.0-darwin-arm64.zip
chromedriver-v20.0.0-darwin-arm64.zip
chromedriver-v19.0.0-darwin-arm64.zip
chromedriver-v18.0.0-darwin-arm64.zip
chromedriver-v17.0.0-darwin-arm64.zip
chromedriver-v16.0.0-darwin-arm64.zip
chromedriver-v15.0.0-darwin-arm64.zip
chromedriver-v14.0.0-darwin-arm64.zip
chromedriver-v13.0.0-darwin-arm64.zip
chromedriver-v12.0.0-darwin-arm64.zip
chromedriver-v11.0.0-darwin-arm64.zip
That makes sense. The M1 was released in November 2020 and v10 was release in late August 2020.
Thanks for the script and info @seanpoulter! I've made changes and upgraded electron and no longer have this issue.
I upgraded to electron v27 and chrome driver v118 was found for mac arm. Is there a documented min version of electron for mac arm?