Closed ambirdsall-gogo closed 3 years ago
I updated the code to use version 4.5.0 of webdrivers
, but to no avail:
➣ grep webdrivers Gemfile.lock
webdrivers (4.5.0)
webdrivers (~> 4.5)
➣ rails routes
rails aborted!
Errno::E086: Bad CPU type in executable - /Users/alex.birdsall/.webdrivers/chromedriver
[stack trace leading to the rails initializer which calls `Webdrivers::Chromedriver.update`]
Apologies for spamming the notifications for this project as I work through the issue; once I deleted the unusable-but-version-conformant chromedriver
binary, the latest version of the gem installed the correct replacement in its place. It's possible to add code to check the installed driver's architecture against the system along with the version check, but I'm not remotely sure that the added complexity's maintenance burden would be justified by closing out a transient edge case.
Thanks for making such a helpful tool!
@ambirdsall-gogo Glad you figured it out. This was something that crossed my mind when merging the PR, but didn't act on it since this is a one time manual step. Besides that, I assumed most people were just starting fresh (without any drivers) on their shiny new M1 macs :).
I have updated the README with a note for other users - https://github.com/titusfortner/webdrivers#chrome-and-edge-on-apple-m1-arm64
Summary
On a mac,
Webdrivers::Chromedriver.update
resolves the latestchromedriver
binary to the version compiled for the new ARM macs, even on macs with x86 chips. Now any code path which useschromedriver
or theWebdrivers
code related to it leads to error messages containingBad CPU type in executable - ~/.webdrivers/chromedriver (Errno::E086)
Debug Info
Please provide the following information for bug reports:
Expected Behavior
I expect Webdrivers to install
88.0.4324.96/chromedriver_mac64.zip
from https://chromedriver.storage.googleapis.com/Actual Behavior
Webdrivers installs
88.0.4324.96/chromedriver_mac64_m1.zip
Caveat
I can't see a way to properly verify the version it installed, so the "Actual Behavior" is to some degree an educated guess: