Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome process did not produce websocket url within 1 seconds (RuntimeError) #77

Closed
gregoryduckworth opened this issue Apr 11, 2019 · 9 comments

Comments

@gregoryduckworth
Copy link

Even after updating the cuprite declaration (as seen below) we still get the error Chrome process did not produce websocket url within 1 seconds (RuntimeError)

Capybara.register_driver :cuprite do |app|
  Capybara::Cuprite::Driver.new(app, {
  headless: true,
  inspector: true,
  process_timeout: 5,
  url_blacklist: [
    'blacklisted_url'
  ],
  browser_options: {
    'ignore-certificate-errors' => true
  },
  timeout: 120
})
end

Is there some configuration missing?

@route
Copy link
Member

route commented Apr 11, 2019

@gregoryduckworth what is you OS? Do you have Chrome in $PATH?

@route
Copy link
Member

route commented Apr 16, 2019

Can't help without additional info.

@route route closed this as completed Apr 16, 2019
@zuburqan
Copy link

I am having the same issue, the environment is:

OS: 4.1.12-61.1.28.el7uek.x86_6 (RHEL 7)
Browser: Chromium v73.0.3683.86
Chromedriver: v73.0.3683.86

Chromium and chromedriver are already in the $PATH

Configuration is:

Capybara.register_driver :cuprite do |app|
  options = {window_size: [1440, 900]}
  options[:headless] = true
  Capybara::Cuprite::Driver.new(app, options)
end

@route route reopened this Apr 18, 2019
@route
Copy link
Member

route commented Apr 18, 2019

@zuburqan did you also try to increase process_timeout?

@gregoryduckworth
Copy link
Author

Sorry about the slow reply, I've had this in docker using the versions:

Google Chrome 72.0.3626.109

Distributor ID:	Debian
Description:	Debian GNU/Linux 9.4 (stretch)
Release:	9.4
Codename:	stretch

and can confirm that it is in the $PATH.

@route
Copy link
Member

route commented May 8, 2019

@gregoryduckworth there's one remark in README now for docker https://github.com/machinio/cuprite#running-in-docker Looks like you didn't pass no-sandbox option.

@gregoryduckworth
Copy link
Author

Thanks! Working now.

@ndbroadbent
Copy link

Sorry to comment on an old issue, but hopefully this might help someone else! I was struggling with getting cuprite to control Chrome on GitHub Actions, and it turns out that the default process_timeout of 1 second is just too short so Chrome didn't have time to start on the CI servers. (The no-sandbox option is also important.) Here's my working :cuprite driver for Capybara:

  Capybara.register_driver(:cuprite) do |app|
    browser_options = {}
    browser_options['no-sandbox'] = nil if ENV['CI']
    headless = !ENV['SHOW_BROWSER']
    Capybara::Cuprite::Driver.new(
      app,
      browser_options: browser_options,
      headless: headless,
      process_timeout: 20
    )
  end
  Capybara.javascript_driver = :cuprite

@route
Copy link
Member

route commented Jun 9, 2022

@ndbroadbent I'll increase defaults

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants