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

[🐛 Bug]: NoMethodError: undefined method `command_list' for #<Selenium::WebDriver::Remote::Bridge #2052

Closed
giladshanan opened this issue Dec 7, 2023 · 8 comments

Comments

@giladshanan
Copy link

What happened?

I'm using the selenium/standalone-chrome image to run JS specs via teaspoon for an open source project:
https://github.com/tablexi/nucore-open

The specs run via Github Actions, referencing the latest image tag. Yesterday builds started failing.
I can get specs running again by pinning the image to an older tag:
selenium/standalone-chrome:119.0.6045.199-chromedriver-119.0.6045.105

The log output indicates NoMethodError: undefined method command_list' for #<Selenium::WebDriver::Remote::Bridge`, which makes me think this may be related to:
SeleniumHQ/selenium#12037

Perhaps there are some additional changes needed to config options to get this working properly with the latest version of selenium/standalone-chrome?

Command used to start Selenium Grid with Docker (or Kubernetes)

bundle exec rake teaspoon

Relevant log output

bundle exec rake teaspoon
  shell: sh -e {0}
  env:
    TEASPOON_RAILS_ENV: test
    RAILS_ENV: test
    MYSQL_HOST: mysql
    MYSQL_USER: root
    MYSQL_PASSWORD: root
    SELENIUM_HOST: selenium
    SELENIUM_PORT: 4444
    TEST_APP_PORT: 3000
Starting the Teaspoon server...
Teaspoon running default suite at http://172.18.0.2:3000/teaspoon/default
rake aborted!
NoMethodError: undefined method `command_list' for #<Selenium::WebDriver::Remote::Bridge:0x00007fa3a3ddfb78 @http=#<Selenium::WebDriver::Remote::Http::Default:0x00007fa3a427cbb8 @open_timeout=nil, @read_timeout=120, @server_url=#<URI::HTTP http://selenium:4444/wd/hub/>, @proxy=nil, @http=#<Net::HTTP selenium:4444 open=true>>, @file_detector=#<Proc:0x00007fa3a3db4090 /__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/driver.rb:39 (lambda)>, @session_id="19a093407a2d1f99df35684aed5b0816", @capabilities=#<Selenium::WebDriver::Remote::Capabilities:0x00007fa3a3db6638 @capabilities={:timeouts=>{:implicit=>0, :page_load=>300000, :script=>30000}, :browser_name=>"chrome-headless-shell", :browser_version=>"120.0.6099.62", :platform_name=>"linux", :accept_insecure_certs=>false, :page_load_strategy=>"normal", :set_window_rect=>true, :unhandled_prompt_behavior=>"dismiss and notify", :strict_file_interactability=>false, "chrome"=>{"chromedriverVersion"=>"120.0.6099.62 (93ab19d804d479b507c4694305631dfb65f8e930-refs/branch-heads/6099_56@{#3})", "userDataDir"=>"/tmp/.org.chromium.Chromium.ezAmuU"}, "fedcm:accounts"=>true, "goog:chromeOptions"=>{"debuggerAddress"=>"localhost:42557"}, "networkConnectionEnabled"=>false, "se:bidiEnabled"=>false, "se:cdp"=>"ws://172.18.0.4:4444/session/19a093407a2d1f99df35684aed5b0816/se/cdp", "se:cdpVersion"=>"120.0.6099.62", "se:vnc"=>"ws://172.18.0.4:4444/session/19a093407a2d1f99df35684aed5b0816/se/vnc", "se:vncEnabled"=>true, "se:vncLocalAddress"=>"ws://172.18.0.4:7900", "webauthn:extension:credBlob"=>true, "webauthn:extension:largeBlob"=>true, "webauthn:extension:minPinLength"=>true, "webauthn:extension:prf"=>true, "webauthn:virtualAuthenticators"=>true}>, @browser=:"chrome-headless-shell">

          command_list = @bridge.command_list
                                ^^^^^^^^^^^^^
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/remote/driver.rb:40:in `initialize'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/common/driver.rb:57:in `new'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver/common/driver.rb:57:in `for'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/selenium-webdriver-4.15.0/lib/selenium/webdriver.rb:89:in `for'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/teaspoon/driver/selenium.rb:26:in `run_specs'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/teaspoon/console.rb:56:in `run_specs'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/teaspoon/console.rb:45:in `block in execute_without_handling'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/teaspoon/console.rb:43:in `each'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/teaspoon/console.rb:43:in `inject'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/teaspoon/console.rb:43:in `execute_without_handling'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/teaspoon/console.rb:28:in `execute'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/teaspoon/console.rb:24:in `failures?'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/teaspoon-1.4.0/lib/tasks/teaspoon.rake:14:in `block in <main>'
/__w/nucore-open/nucore-open/vendor/bundle/ruby/3.1.0/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/cli.rb:483:in `exec'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/cli.rb:25:in `start'
/usr/local/bundle/gems/bundler-2.3.11/exe/bundle:48:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.3.11/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.3.11/exe/bundle:36:in `<top (required)>'
/usr/local/bundle/bin/bundle:25:in `load'
/usr/local/bundle/bin/bundle:25:in `<main>'
Tasks: TOP => teaspoon
(See full trace by running task with --trace)
Error: Process completed with exit code 1.

Operating System

ubuntu-latest

Docker Selenium version (tag or chart version)

Digest: sha256:e964b7ad9b2588d945fc30bad03fbd71bc0166d7c4e8cffcac5ff2dff372ae54

Copy link

github-actions bot commented Dec 7, 2023

@giladshanan, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@VietND96
Copy link
Member

VietND96 commented Dec 8, 2023

The specs run via Github Actions, referencing the latest image tag.

Hello @giladshanan, the latest tag now point to release image 4.16.0-20231206. If you are suspect that due to upstream SeleniumHQ/selenium#12037, can you please raise the issue there?
Also, I saw there was a patch 4.16.1 updated yesterday (https://github.com/SeleniumHQ/selenium/releases/tag/selenium-4.16.0), we will bump latest to take 4.16.1 and you can try again today.

@VietND96
Copy link
Member

VietND96 commented Dec 8, 2023

Hi @giladshanan, standalone-chrome tag latest is mapping with 120.0.6099.71-chromedriver-120.0.6099.71, can you trigger the CI to check? If the issue is still present, I think should be updated to refer to specific chrome version, or raise the issue on upstream project for the fix in next version.

@giladshanan
Copy link
Author

@VietND96 thank you for your reply! I will have some time to check on this tomorrow and will report back

@giladshanan
Copy link
Author

@VietND96 I get this error with selenium/standalone-chrome:latest, see:
https://github.com/tablexi/nucore-open/actions/runs/7212414420/job/19650038844?pr=3895

@rcaught
Copy link

rcaught commented Jan 24, 2024

@VietND96
Copy link
Member

https://github.com/SeleniumHQ/selenium/blob/83838605d1c16c5d106cab273926a2e457042e0b/rb/CHANGES#L7

Image tag latest now is built on top of Selenium 4.17.0, it contains the fix from upstream

giladshanan added a commit to tablexi/nucore-open that referenced this issue Feb 1, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants