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

Capybara cannot configure Firefox #2766

Open
adeherdt-r7 opened this issue Jul 10, 2024 · 2 comments
Open

Capybara cannot configure Firefox #2766

adeherdt-r7 opened this issue Jul 10, 2024 · 2 comments

Comments

@adeherdt-r7
Copy link

Meta

Capybara Version: 3.40.0
Driver Information (and browser if relevant):

  • selenium-webdriver: 4.10.0
  • Firefox: 128.0 (Snap Installation)

Expected Behavior

  • Tests written with Cucumber and Capybara should work

Actual Behavior

Tests crash during Capybara configuration:

Selenium::WebDriver::Error::UnknownError: Process unexpectedly closed with status 127
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/remote/response.rb:55:in `assert_ok'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/remote/http/common.rb:83:in `new'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/remote/http/common.rb:83:in `create_response'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/remote/http/default.rb:104:in `request'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/remote/bridge.rb:620:in `execute'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/remote/bridge.rb:53:in `create_session'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/common/driver.rb:317:in `block in create_bridge'
<internal:kernel>:90:in `tap'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/common/driver.rb:316:in `create_bridge'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/common/driver.rb:74:in `initialize'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/firefox/driver.rb:43:in `initialize'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/common/driver.rb:53:in `new'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver/common/driver.rb:53:in `for'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/selenium-webdriver-4.10.0/lib/selenium/webdriver.rb:88:in `for'
/home/noel/.rvm/gems/ruby-3.1.4@pro/gems/capybara-3.40.0/lib/capybara/selenium/driver.rb:75:in `browser'
/home/noel/RubymineProjects/pro/ui/features/support/hooks/browser.rb:3:in `Before'

The before block:

Before('not @json') do
  Capybara.reset_sessions!
  Capybara.current_session.driver.browser.manage.window.resize_to(1920, 1050)
  if TestConfig.instance.video_capture
    TestConfig.instance.headless.video.start_capture
  end
end

Steps to reproduce

  • Ruby on Rails project
  • Capybara
  • Firefox installation using Ubuntu Snap
  • Setup before block
  • run a test
@twalpole
Copy link
Member

Seems like you're trying to set the window size on a non-existent session

@adeherdt-r7
Copy link
Author

Seems like you're trying to set the window size on a non-existent session

The issue is snap.
This is Firefox installed through snap, and Capybara is unable to work with it.
Standalone installations seem to work fine.

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

2 participants