Showing Error - unknown error: DevToolsActivePort file doesn't exist - it's electron application (I am using windows OS))

后端 未结 2 562
天命终不由人
天命终不由人 2020-12-22 05:08

When I run my code it\'s showing below error - Electron application

org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn\'t e         


        
2条回答
  •  我在风中等你
    2020-12-22 05:27

    This error message...

    org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist. 
    Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z' 
    System info: host: 'DESKTOP-GN8LLQU', ip: '192.168.1.20', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.2' 
    Driver info: driver.version: ChromeDriver
    

    ...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.

    Your main issue is the incompatibility between the version of the binaries you are using as follows:

    • Possibly you are using the latest chromedriver=77.0
    • Possibly you are using_chrome= 77.0_
    • Your Selenium Client version is 3.6.0 of 2017-09-27T15:28:36.4Z which is almost 2 years older.
    • Your JDK version is 11.0.2.

    So there is a clear mismatch between the Selenium Client v3.6.0 , ChromeDriver v77.0 and the Chrome Browser v77.0


    Solution

    Ensure that:

    • Selenium is upgraded to current levels Version 3.141.59.
    • ChromeDriver is updated to current ChromeDriver v77.0 level.
    • Chrome is updated to current Chrome Version 77.0 level. (as per ChromeDriver v77.0 release notes)
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
    • Take a System Reboot.
    • Execute your @Test as non-root user.
    • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

    Note: As per Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11 it may be a better idea to downgrade to Java 8


    Outro

    • WebDriverException: unknown error: DevToolsActivePort file doesn't exist while trying to initiate Chrome Browser

提交回复
热议问题