The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed for Selenium

前端 未结 1 749
耶瑟儿~
耶瑟儿~ 2021-01-16 22:10

I’m running a jupyter notebook on ubuntu server. I’m trying run the selenium code below using chromedriver. I’m getting the error below but if I run the line of code below

1条回答
  •  执笔经年
    2021-01-16 22:56

    This error message...

    WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
      (unknown error: DevToolsActivePort file doesn't exist)
      (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
      (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.15.0-46-generic x86_64)
    

    ...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:

    • You are using chromedriver=74.0.3729.6
    • Release Notes of chromedriver=74.0.3729.6 clearly mentions the following :

    Supports Chrome v74

    • Perhaps you are using the last GAed version of Chrome Browser i.e. chrome=73.x

    So there is a clear mismatch between the ChromeDriver v74.0.3729.6 and the Chrome Browser v73.x

    Solution

    • Downgrade ChromeDriver to ChromeDriver v73.0.3683.68 level.
    • Keep Chrome version at Chrome v73 level. (as per ChromeDriver v73.0.3683.68 release notes)
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • Execute your @Test.
    • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

    0 讨论(0)
提交回复
热议问题