Selenium: [rb] selenium-webdriver 3.13.0 gives DevToolsActivePort file doesn't exist error

Created on 26 Jun 2018  路  22Comments  路  Source: SeleniumHQ/selenium

Meta -

OS:
OSX
Selenium Version:
3.13.0
Browser:
Chrome

Browser Version:
chromedriver=2.40.565383

Expected Behavior -

No error

Actual Behavior -

Selenium::WebDriver::Error::UnknownError:
       unknown error: DevToolsActivePort file doesn't exist
         (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.4.0-112-generic x86_64)

Steps to reproduce -

Here's a build that fails:
https://travis-ci.org/projectblacklight/blacklight/jobs/397053599
And when I pin the version of selenium-webdriver to ~> 3.12.0 the error does not occur

See:
https://github.com/projectblacklight/blacklight/pull/1912
https://travis-ci.org/projectblacklight/blacklight/jobs/397060363

Most helpful comment

Gem 3.13.1 has been released.

All 22 comments

I have the same problem with 3.13.0, see https://github.com/connorshea/mdn-compat-data-explorer/pull/91

Error:
FeaturesTest#test_search_works:
Selenium::WebDriver::Error::UnknownError: unknown error: DevToolsActivePort file doesn't exist
  (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.14.12-041412-generic x86_64)

I think the source of the issue is actually options not working (see #6071) but I'm not 100% sure.

Yup, this is definitely caused by the same issue as #6071, the patch suggested there fixes the problem for me.

This is a chromedriver issue, there are several ones reported, see
https://bugs.chromium.org/p/chromedriver/issues/list?can=2&q=DevToolsActivePort

@barancev Can you say more about why this is only a problem with 3.13.0 and not with selenium 2.12.0?

@jcoyne 2.12.0? Is there a typo?

I suppose it's related to this change:
https://github.com/SeleniumHQ/selenium/commit/0ba8188b1a26ff3587f08afa6b6182c32479e980
Ruby binding sends "proper" W3C conformant payload to chromedriver now.

Some other bindings (say, Java) started to send W3C conformant payload earlier, in 3.12, and they hit the same issue in chromedriver, it's not Ruby-specific.

@barancev yes a typo and thank you for the explanation. I think I understand better now. 馃憤

I have hit the same issue while moving my project to linux today. Can someone provide the version # of both Selenium and ChromeDriver, that are working ? thanks,

I have the same issue. Please re-open.

I also have this issue on Ubuntu Precise.

The solutions have been mentioned. There are 2 avenues to go down.
1 - Looking into Chromedriver
2 - you could try hitting the master branch of selenium-webdriver. Which has some fixes in we believe fix this issue.

Is there any timeframe for the next release to rubygems that contains this fix?

In theory a 3.13.1 patch release could be cut, but I don't have access to do it.

I'll ping p0deje in slack to see if he's available to do so.

Gem 3.13.1 has been released.

@p0deje thanks! 馃檱

@luke-hill, @p0deje thanks guys!

I have Selenium 3.13.1 version
but it does not work((((

https://travis-ci.com/bogdan8/if-initiatives/builds/80136113

@bogdan8 On a side note (won't fix this issue) , why are you calling Capybara.current_session.driver.browser.manage.window.resize_to(2_500, 2_500)?? You should be calling Capybara.current_session.current_window.resize_to(2_500, 2_500)

@twalpole
hmm, Yes it works, thank you very much

I just installed chromedriver=2.41.578700 with selenium-webdriver (3.14.1) and am hitting this problem running a basic script:

  args = %w[
    --no-sandbox
    --headless
    --disable-gpu
    --dump-dom
    --disable-dev-shm-usage
    --window-size=1400,1400
  ]

  Selenium::WebDriver::Chrome.driver_path = '/usr/bin/chromedriver'
  options = Selenium::WebDriver::Chrome::Options.new(args: args)
  driver = Selenium::WebDriver.for(:chrome, options: options)

@esilverberg I don't think it's related to Selenium because it works fine if you remove --dump-dom flag.

@esilverberg @p0deje is not related to Selenium, it's caused by Chromedriver, the way I've solved this issue is to specify both --remote-debugging-port=922 arguments and make the driver headless, if that's not an option for you, I would suggest you try to use Operadriver instead like so: Selenium::WebDriver::Chrome.driver_path = '/usr/bin/operadriver'.

Was this page helpful?
0 / 5 - 0 ratings