Edge Chromium Driver does not work on Mac

Asyranok 1 Reputation point
2020-10-14T18:05:58.85+00:00

Hi,

I am using Nightwatchjs and cucumber-js to to automate testing on a website. Chrome, Firefox, and Safari work fine in Nightwatchjs, but Edge will not work. I downloaded every single available driver for Mac available here. The version "86.0.622.38" matches the version Edge on my Mac. But all of them show the same error below when started:

Error: Timeout while trying to connect to EdgeDriver on port 4445.
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
dyld: Library not loaded: @rpath/libc++.dylib
Referenced from: /Users/asyranok/nightwatch-js-automation/./msedgedriver
Reason: image not found

I've googled for this error, but I can't find any results related to the edge driver, and none of the results I did find really seemed to make something click for me. Here is the current chunk of code in my nightwatch.conf.js file for edge:

edge: {
  desiredCapabilities: {
    //alwaysMatch: { 'ms:edgeOptions': { args: ['--headless'] } },
    browserName: 'MicrosoftEdge',
    javascriptEnabled: true,
    acceptSslCerts: true,
    edgeOptions:{
      w3c: false,
    }
  },
  start_process: false,
  webdriver: {
    default_path_prefix: '',
    server_path: './msedgedriver',
    start_process: true,
    port: 4445,
    use_legacy_jsonwire: true
  }
}

Although I am not sure the config matters for this particular issue, because I get the same error if I simply try to execute the binary directly with a mouse click, or by just calling "msedgedriver". I also downloaded the npm edgedriver package, but that always gives me a windows executable binary, so I instead tried downloading the Mac driver and executed in the above way, which is how I ran into this issue.

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,238 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yu Zhou-MSFT 12,951 Reputation points Microsoft Vendor
    2020-10-15T06:01:34.783+00:00

    From the last paragraph of your description, it seems that the issue isn't related with Nightwatchjs and cucumber-js because you can't get msedgedriver work even by simply executing it.

    I met a same issue a few days ago. The person started the msedgedriver in the terminal and it showed the same error as yours. The error means lacking of some core files and was fixed by reinstalling Edge browser. You can refer to this link and try the same solution to reinstall Edge browser to see if msedgedriver can be executed directly without Nightwatchjs and cucumber-js.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Regards,
    Yu Zhou


  2. Yu Zhou-MSFT 12,951 Reputation points Microsoft Vendor
    2020-10-21T02:55:54.763+00:00

    @Asyranok , the issue is that libc++.dylib is not found when referencing dynamic library. This article explains why it can't be found. To put it simply, macOS has added a defensive wall to prevent third parties from maliciously modifying the app, and does not allow the app to load dynamic libraries or scripts. You can also follow the steps in this thread. It provides a more detailed solution. If it still can't solve your issue, I suggest that you ask the question on some macOS forums as it's a problem more related with macOS.