OSX 修复 Selenium Chromedriver 启动错误产生未知系统错误 -86 可执行文件中的错误 CPU 类型? [英] OSX fix Selenium Chromedriver launch error spawn Unknown system error -86 Bad CPU type in executable?
问题描述
突然在 2021 年 1 月 6 日下午,我在 OSX 下的 Selenium Protractor 测试因神秘错误而停止工作
Suddenly on the afternoon of January 6, 2021, my Selenium Protractor tests under OSX stopped working with the mysterious error
spawn Unknown system error -86
我做了一些研究,发现错误号 86 与
I did some research and discovered that error number 86 is the same as
Bad CPU type in executable
并运行以下命令将我的 chromedriver 二进制文件的 cpu 架构与我的系统进行比较:
and ran the following to compare the cpu architecture of my chromedriver binary to my system:
% file chromedriver_87.0.4280.88
chromedriver_87.0.4280.88: Mach-O 64-bit executable arm64
% uname -a
Darwin kobl179273m 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
% uname -p
i386
如何修复我的 Selenium 使用的 chromedriver 二进制文件,以便它可以在我的 Intel x64 mac 上运行并清除系统错误 -86".或错误的 CPU 类型";留言?
How can I fix the chromedriver binary used by my Selenium so that it will run on my Intel x64 mac and clear the "system error -86" or "Bad CPU type" message?
推荐答案
问题在 https://github.com/angular/webdriver-manager/issues/476.这已在 12.1.8 中修复,因此只需更新到该 webdriver 管理器即可.
The issue is described in https://github.com/angular/webdriver-manager/issues/476. This has been now fixed in 12.1.8 so just update to that webdriver manager.
对于大多数用户来说,这可以通过
For most users this can be accomplished with
npm uninstall protractor && npm install protractor
这篇关于OSX 修复 Selenium Chromedriver 启动错误产生未知系统错误 -86 可执行文件中的错误 CPU 类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!