2

MSEdgeDriver and browser version used 88.0.705.63 (64 bit).

Works when provided with edge options.addArguments("--headless"); but does not worked when this is removed. The below error is thrown

Message: org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'A036T0L6347NRVX', ip: '10.227.221.75', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_66'
Driver info: driver.version: EdgeDriver
remote stacktrace: Backtrace:
    Ordinal0 [0x00007FF6D6D0AF92+241554]
    GetHandleVerifier [0x00007FF6D747CA88+2173368]
    GetHandleVerifier [0x00007FF6D749FAC8+2316792]
    GetHandleVerifier [0x00007FF6D7499BC9+2292473]
    GetHandleVerifier [0x00007FF6D74CB760+2496144]
    GetHandleVerifier [0x00007FF6D74C7A5F+2480527]
    GetHandleVerifier [0x00007FF6D74A550A+2339898]
    GetHandleVerifier [0x00007FF6D74A614B+2343035]
    Ordinal0 [0x00007FF6D6CE2D01+77057]

Edge options used :

EdgeOptions options = new EdgeOptions();
        options.addArguments("--no-sandbox");
        options.setBinary("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
        options.addArguments("--disable-dev-shm-usage"); // overcome limited resource problems
        options.addArguments("disable-infobars"); // disabling infobars
        options.addArguments("--disable-extensions"); // disabling extensions
        options.addArguments("--disable-gpu"); // applicable to windows os only
        options.addArguments("--disable-dev-shm-usage");
S S
  • 313
  • 4
  • 12
  • 1
    see if you are compatible versions of edge and edge driver, and have set `System.setProperty("webdriver.edge.driver", "C:\\Users\\prave\\Downloads\\msedgedriver.exe");` – PDHide Mar 18 '21 at 00:08
  • Yes, I have setProperty - `System.setProperty("webdriver.edge.driver","C:\\Users\\******\\Downloads\\edgedriver_win64\\msedgedriver.exe")` I am not sure how headless works and without that it throws DevToolsActivePort – S S Mar 18 '21 at 01:39
  • 1
    I searched a lot and find that there're many similar issues: [thread 1](https://stackoverflow.com/questions/50749488/webdriver-and-chrome-devtoolsactiveport-file-doesnt-exist/50863116), [thread 2](https://stackoverflow.com/questions/56637973/how-to-fix-selenium-devtoolsactiveport-file-doesnt-exist-exception-in-python). Add `--headless` is one of the workaround. You can also try the other workaround: add `--remote-debugging-port=`. – Yu Zhou Mar 18 '21 at 06:29
  • 1
    About the cause of the issue, I think [this answer](https://stackoverflow.com/questions/58500512/showing-error-unknown-error-devtoolsactiveport-file-doesnt-exist-its-elec/62545820#62545820) makes sense. You can try the solution in the answer. Besides, the latest version of Edge Official build is 89.0.774.54, you can also try to use this version of Edge and WebDriver to see if the issue can be fixed. – Yu Zhou Mar 18 '21 at 06:31
  • @YuZhou Thank you, adding `--remote-debugging-port=` worked!! – S S Mar 18 '21 at 06:45
  • Great! I'd like to add that as an answer and you can mark it as an accepted answer. It can help other community members in future in similar kind of issues. Thanks for your understanding. – Yu Zhou Mar 18 '21 at 06:50

2 Answers2

1

I searched a lot and find that there're many similar issues: thread 1, thread 2. You can also try another workaround: add --remote-debugging-port=<port>.

About the cause of the issue, I think this answer makes sense. You can also try the other solution in the answer.

Yu Zhou
  • 11,532
  • 1
  • 8
  • 22
0

I had this issue pop up from one day to another. The system had been working OK and suddenly started giving the "DevToolsActivePort file doesn't exist" error.

  • option --headless is not an option for me as I need the application visible
  • I tried option --remote-debugging-port=, the problem changed to "chrome not found"

I noticed that IT had pushed an upgrade of EDGE from version 109 to version 110 (On a weekend!!!). After a couple hours of troubleshooting I found that the user folder apparently had some garbage in it. Deleting the user folder and allowing EDGE to recreate it from scratch solved the issue.