Search code examples
ionic-frameworkprotractore2e-testingangular-e2ee2e

Getting this error when running ng e2e on mac with visual studio code


Setup :

@angular/[email protected]
@ionic/[email protected]
[email protected]
[email protected]
“protractor”: “~5.4.0


Mac OS : Catalina

This is the error I am getting

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
:information_source: 「wdm」: Compiled successfully.
[12:08:58] I/launcher - Running 1 instances of WebDriver
[12:08:58] I/direct - Using ChromeDriver directly...
[12:08:58] E/runner - Unable to start a WebDriver session.
[12:08:58] E/launcher - Error: Error: spawn Unknown system error -86
    at ChildProcess.spawn (internal/child_process.js:403:11)
    at Object.spawn (child_process.js:553:9)
    at exec (/Users/sunilharan/Documents/Projects/IONIC/App_NAME/node_modules/selenium-webdriver/io/exec.js:116:27)
    at /Users/sunilharan/Documents/Projects/IONIC/App_NAME/node_modules/selenium-webdriver/remote/index.js:219:25
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
[12:08:58] E/launcher - Process exited with error code 100

This same setup is working on another machine running on M1 chip. I have tried on different computers but not working on any of them except my M1 Macbook Pro.


Solution

  • This is an issue with the latest chromedriver on MacOS. Please see detailed resolutions in this ticket.

    "As a general solution, simply avoid using the chromedriver that has _m1 in its filename if you are on an Intel mac."

    OSX fix Selenium Chromedriver launch error spawn Unknown system error -86 Bad CPU type in executable?