Skip to content

[🐛 Bug]: Opening session with firefox docker image always times out (ruby) #1682

@danielittlewood0

Description

@danielittlewood0

What happened?

I am trying to use the selenium/standalone-firefox docker image as a remote browser to run some ruby tests in a separate container. The remote browser opens fine, and I can visit localhost:4444 and localhost:7900 in a browser. I can also make curl requests to the browser from inside my testing container, so it doesn't seem to be a networking issue.

When the tests try to open a session with the browser, however, it always times out. I have tried messing with the version number of selenium-webdriver, and the docker image (none have worked for me).

Command used to start Selenium Grid with Docker

docker-compose run test

Full repo at https://gitlab.com/danielittlewood0/selenium-test

Relevant log output

/usr/local/lib/ruby/3.0.0/net/protocol.rb:219:in `rbuf_fill': Net::ReadTimeout with #<TCPSocket:(closed)> (Net::ReadTimeout)
        from /usr/local/lib/ruby/3.0.0/net/protocol.rb:193:in `readuntil'
        from /usr/local/lib/ruby/3.0.0/net/protocol.rb:203:in `readline'
        from /usr/local/lib/ruby/3.0.0/net/http/response.rb:42:in `read_status_line'
        from /usr/local/lib/ruby/3.0.0/net/http/response.rb:31:in `read_new'
        from /usr/local/lib/ruby/3.0.0/net/http.rb:1557:in `block in transport_request'
        from /usr/local/lib/ruby/3.0.0/net/http.rb:1548:in `catch'
        from /usr/local/lib/ruby/3.0.0/net/http.rb:1548:in `transport_request'
        from /usr/local/lib/ruby/3.0.0/net/http.rb:1521:in `request'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/remote/http/default.rb:118:in `response_for'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/remote/http/default.rb:77:in `request'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/remote/bridge.rb:625:in `execute'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/remote/bridge.rb:52:in `create_session'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/common/driver.rb:323:in `block in create_bridge'
        from <internal:kernel>:90:in `tap'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/common/driver.rb:321:in `create_bridge'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/common/driver.rb:74:in `initialize'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/remote/driver.rb:43:in `initialize'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/common/driver.rb:57:in `new'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver/common/driver.rb:57:in `for'
        from /usr/local/bundle/gems/selenium-webdriver-4.4.0/lib/selenium/webdriver.rb:89:in `for'
        from test.rb:5:in `<main>'
ERROR: 1

Operating System

Gentoo Linux

Docker Selenium version (tag)

selenium/standalone-firefox:4.4.0-20220831

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions