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]: wrong number of arguments for common/logger `initialize' #12013

Closed
Pepan opened this issue May 9, 2023 · 5 comments
Closed

[🐛 Bug]: wrong number of arguments for common/logger `initialize' #12013

Pepan opened this issue May 9, 2023 · 5 comments

Comments

@Pepan
Copy link

Pepan commented May 9, 2023

What happened?

Running system tests fails with

Minitest::UnexpectedError: ArgumentError: wrong number of arguments (given 2, expected 0..1)

/Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/logger.rb:51:in `initialize'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara/selenium/logger_suppressor.rb:8:in `initialize'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver.rb:99:in `new'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver.rb:99:in `logger'
...

### How can we reproduce the issue?

```shell
Just update to latest VERSION: 4.9.1 and run system tests under rails

Relevant log output

Minitest::UnexpectedError: ArgumentError: wrong number of arguments (given 2, expected 0..1)
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/logger.rb:51:in `initialize'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara/selenium/logger_suppressor.rb:8:in `initialize'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver.rb:99:in `new'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver.rb:99:in `logger'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/service_manager.rb:81:in `build_process'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/service_manager.rb:103:in `start_process'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/service_manager.rb:57:in `block in start'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/socket_lock.rb:42:in `locked'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/service_manager.rb:55:in `start'
    <internal:kernel>:90:in `tap'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/service.rb:91:in `launch'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/driver.rb:334:in `service_url'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/local_driver.rb:28:in `initialize_local_driver'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/chrome/driver.rb:34:in `initialize'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/driver.rb:47:in `new'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver/common/driver.rb:47:in `for'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-4.9.1/lib/selenium/webdriver.rb:88:in `for'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara/selenium/driver.rb:83:in `browser'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/actionpack-6.1.7.3/lib/action_dispatch/system_testing/driver.rb:48:in `block in register_selenium'
    <internal:kernel>:90:in `tap'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/actionpack-6.1.7.3/lib/action_dispatch/system_testing/driver.rb:47:in `register_selenium'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/actionpack-6.1.7.3/lib/action_dispatch/system_testing/driver.rb:35:in `block in register'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara/session.rb:105:in `driver'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara/session.rb:91:in `initialize'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara.rb:421:in `new'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara.rb:421:in `block in session_pool'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara.rb:317:in `current_session'
    /Users/josefchmel/.rvm/gems/ruby-3.0.0/gems/capybara-3.39.0/lib/capybara/dsl.rb:46:in `page'

Operating System

macOS Ventura

Selenium version

Ruby selenium-webdriver 4.9.1

What are the browser(s) and version(s) where you see this issue?

113.0.5672.92

What are the browser driver(s) and version(s) where you see this issue?

chromedriver: 110.0.5481.77

Are you using Selenium Grid?

No response

@Pepan
Copy link
Author

Pepan commented May 9, 2023

reverting back as gem 'selenium-webdriver', '4.9.0' solves the issue

@github-actions
Copy link

github-actions bot commented May 9, 2023

@Pepan, 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!

@titusfortner
Copy link
Member

Yes, it broke how Capybara is wrapping the class; I made a PR there.
Duplicate of #12005

@ahangarha
Copy link

Link to the relevant PR in Capybara: teamcapybara/capybara#2667

Copy link

github-actions bot commented Dec 9, 2023

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 Dec 9, 2023
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