Open ciekawy opened 3 years ago
As I badly needed to get unblocked - here is a hacky workaround for anyone in similar situation (only for x86_64 macOS). In node_modules/webdriver-manager/built/lib/files/file_manager.js
update fileUrl.url
around 166:
fileUrl.url = fileUrl.url.replace(/_m1/, '');
I did quick investigation yet it was not clear to me what the fixing PR should look like.
@cnishina If I understand the code correctly we need a fix somewhere here https://github.com/angular/webdriver-manager/blob/legacy/lib/binaries/chrome_xml.ts#L37
I don't know what's the osarch reported for m1 CPUs but the problem is that both m1 and x84_64 versions of chromedriver have mac64
in the name so we need to remove the ones that have m1
in the name for x84_64 and for m1
we'd have to remove the ones that don't have m1
in the name
@ciekawy Thanks for your fix got tests working again on mac for development.
@ciekawy thank you for the suggestion...seems to work
Hi everyone. We'll have a fix this weekend.
This has been published 12.1.8. After updating to version 12.1.8, you will need to run webdriver-manager clean
before running webdriver-manager update
Leaving this issue open for users running into this problem.
Hey There!
I'm still getting the issue I have tried a while ago but I keep getting the error. Am I doing something wrong? I'm doing it directly from my VS Code console. Here's my log.
$ sudo webdriver-manager clean Password: [12:18:37] I/file_manager - removed chromedriver_87.0.4280.88 [12:18:37] I/file_manager - removed chromedriver_87.0.4280.88.zip [12:18:37] I/file_manager - removed geckodriver-v0.28.0 [12:18:37] I/file_manager - removed geckodriver-v0.28.0.tar.gz [12:18:37] I/file_manager - removed selenium-server-standalone-3.141.59.jar [12:18:37] I/file_manager - removed chrome-response.xml [12:18:37] I/file_manager - removed gecko-response.json [12:18:37] I/file_manager - removed standalone-response.xml [12:18:37] I/file_manager - removed update-config.json
$ sudo webdriver-manager update [12:19:02] I/config_source - curl -o/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/standalone-response.xml https://selenium-release.storage.googleapis.com/ [12:19:02] I/config_source - curl -o/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/ [12:19:02] I/config_source - curl -o/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/gecko-response.json https://api.github.com/repos/mozilla/geckodriver/releases [12:19:03] I/downloader - curl -o/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar [12:19:03] I/downloader - curl -o/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.88.zip https://chromedriver.storage.googleapis.com/87.0.4280.88/chromedriver_mac64_m1.zip [12:19:04] I/downloader - curl -o/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.28.0.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.28.0/geckodriver-v0.28.0-macos.tar.gz [12:19:05] I/update - geckodriver: unzipping geckodriver-v0.28.0.tar.gz [12:19:05] I/update - geckodriver: setting permissions to 0755 for /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.28.0 [12:19:05] I/update - chromedriver: unzipping chromedriver_87.0.4280.88.zip [12:19:05] I/update - chromedriver: setting permissions to 0755 for /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.88
$ protractor conf.js [12:21:16] I/launcher - Running 1 instances of WebDriver [12:21:16] I/direct - Using ChromeDriver directly... [12:21:16] E/launcher - spawn Unknown system error -86 [12:21:16] E/launcher - Error: spawn Unknown system error -86 at ChildProcess.spawn (internal/child_process.js:371:11) at Object.spawn (child_process.js:561:9) at exec (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/io/exec.js:116:27) at resolveCommandLineFlags.then.args (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:219:25) at processTicksAndRejections (internal/process/task_queues.js:86:5) From: Task: WebDriver.createSession() at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24) at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15) at Direct.getNewDriver (/usr/local/lib/node_modules/protractor/built/driverProviders/direct.js:77:33) at Runner.createBrowser (/usr/local/lib/node_modules/protractor/built/runner.js:195:43) at q.then.then (/usr/local/lib/node_modules/protractor/built/runner.js:339:29) at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:834:54) at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:863:30 at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:796:13) at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:556:49 at runSingle (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:137:13) [12:21:16] E/launcher - Process exited with error code 199
@cnishina I confirm 12.1.8 works as expected.
@snover80 you might want to force a dependency update on Protractor (e.g. by doing npm install --force protractor
as you probably still have 12.1.7)
The hint regarding protractor update via npm install --force protractor
did the fix. Thanks
Alright guys, not sure why npm install --force protractor didn't work for me (I mean, It kept downloading 12.1.7). I uninstall protractor globally (npm uninstall -g protractor) and install it again, then it worked. Thank you all.
Alright guys, not sure why npm install --force protractor didn't work for me (I mean, It kept downloading 12.1.7). I uninstall protractor globally (npm uninstall -g protractor) and install it again, then it worked. Thank you all.
From the Angular discord channel, you could try to remove your node_modules directory and also your package lock json file. Then run npm cache verify
to clean the cache then reinstall.
what I did for yarn
in regard to update nested dependency I removed webdriver-manager
from yarn.lock
then re-run install. I guess it should work same when you remove webdriver-manager
(main entry) from package-lock.json
False alert - found myself in a branch with outdated webdriver-manager
~for some reason I see now webdriver-manager
downloading arm_64
version again...~
file ./node_modules/webdriver-manager/selenium/chromedriver_88.0.4324.96
./node_modules/webdriver-manager/selenium/chromedriver_88.0.4324.96: Mach-O 64-bit executable arm64
Worked solutions for me:
Solution 1 Reinstall protractor:
yarn remove protractor; yarn add protractor --tilde --dev
Solution 2 Force version of a package without adding to dependency list and without reinstall package:
"resolutions": {
"webdriver-manager": "^12.1.8"
}
This worked for me:
yarn install --force
This should pull in webdriver-manager 12.1.8 and update your yarn.lock 😁
npm install --save-dev webdriver-manager@12.1.8
This fixed the problem for me on its own with no other action
I think m1 builds are new and for some reason
webdriver-manager
sticks tom1
even on intelI/downloader - curl -o/Users/szymon/git/toptal/plan-simply/node_modules/webdriver-manager/selenium/chromedriver_87.0.4280.88.zip https://chromedriver.storage.googleapis.com/87.0.4280.88/chromedriver_mac64_m1.zip
Hey, I'm having a M1 machine and my 'webdriver-manager' only downloads the 'intel' version. How did you manage to get around it? As I want to have the m1 based chromedriver. Thanks in advance.
@iamlevik, what version of webdriver-manager are you using? Here, the problem was the opposite, I think on an M1 mac it should definitely download the M1 version, although I have an Intel based machine. Doesn't an upgrade to the latest version solve your issue?
@iamlevik, what version of webdriver-manager are you using? Here, the problem was the opposite, I think on an M1 mac it should definitely download the M1 version, although I have an Intel based machine. Doesn't an upgrade to the latest version solve your issue?
Hey, just managed to solve it. It seemed that not installing correctly Homebrew (forgot to export the new paths) it forced installed node and webdriver-manager after that as Intel, as it was missing the required path for M1. Afterwards it worked instantly. Thanks for the quick reply!
I think m1 builds are new and for some reason
webdriver-manager
sticks tom1
even on intel