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

Webdrivers Gem Not Getting ChromeDriver For Chrome v116+ #426

Closed
aaronskiba opened this issue Aug 24, 2023 · 3 comments
Closed

Webdrivers Gem Not Getting ChromeDriver For Chrome v116+ #426

aaronskiba opened this issue Aug 24, 2023 · 3 comments

Comments

@aaronskiba
Copy link
Collaborator

To patch issue #403, we applied the following patch:
Webdrivers::Chromedriver.required_version = '114.0.5735.90' # TEMPORARY PATCH

However, now that Google Chrome has updated to v116, the rspec tests fail with the following:

Failure/Error: browser = Capybara.current_session.driver.browser
     
     Selenium::WebDriver::Error::SessionNotCreatedError:
       session not created: This version of ChromeDriver only supports Chrome version 114
       Current browser version is 116.0.5845.110 with binary path /usr/bin/google-chrome

According to https://github.com/titusfortner/webdrivers, "If you cannot upgrade to Selenium 4.11, Webdrivers 5.3.0 will continue to support Ruby 2.6+ and Selenium 4.0 - 4.10"

@aaronskiba
Copy link
Collaborator Author

NOTE: All of the tests are now passing on GitHub, which suggests that the problem is fixed. However, I am noting that problems exist on my Mac OS (perhaps the problem has something to do with Google Chrome on my computer?). For example, the test bundle exec rspec ./spec/features/templates/templates_copying_spec.rb:26 results in the following:

Failures:

  1) Templates::Copying Admin copies an existing Template
     Got 1 failure and 1 other error:

     1.1) Failure/Error: expect(Template.count).to eql(2)
          
            expected: 2
                 got: 1
          
            (compared using eql?)
          # ./spec/features/templates/templates_copying_spec.rb:37:in `block (2 levels) in <top (required)>'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

     1.2) Failure/Error: raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
          
          ActionController::RoutingError:
            No route matches [GET] "/org_admin/templates/1/copies"
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/railties-5.2.8.1/lib/rails/rack/logger.rb:38:in `call_app'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/railties-5.2.8.1/lib/rails/rack/logger.rb:26:in `block in call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/railties-5.2.8.1/lib/rails/rack/logger.rb:26:in `call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/rack-2.2.7/lib/rack/method_override.rb:24:in `call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/rack-2.2.7/lib/rack/runtime.rb:22:in `call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/dragonfly-1.4.0/lib/dragonfly/cookie_monster.rb:9:in `call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/rack-2.2.7/lib/rack/sendfile.rb:110:in `call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/railties-5.2.8.1/lib/rails/engine.rb:524:in `call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/rack-2.2.7/lib/rack/urlmap.rb:74:in `block in call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/rack-2.2.7/lib/rack/urlmap.rb:58:in `each'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/rack-2.2.7/lib/rack/urlmap.rb:58:in `call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/capybara-3.38.0/lib/capybara/server/middleware.rb:60:in `call'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/rack-2.2.7/lib/rack/handler/webrick.rb:95:in `service'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/webrick-1.7.0/lib/webrick/httpserver.rb:140:in `service'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/webrick-1.7.0/lib/webrick/httpserver.rb:96:in `run'
          # /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/webrick-1.7.0/lib/webrick/server.rb:310:in `block in start_thread'
          # ------------------
          # --- Caused by: ---
          # Capybara::CapybaraError:
          #   Your application server raised an error - It has been raised in your test code because Capybara.raise_server_errors == true
          #   /Users/aaronskiba/.rvm/gems/ruby-2.7.6@dmp/gems/capybara-3.38.0/lib/capybara/session.rb:163:in `raise_server_error!

@aaronskiba
Copy link
Collaborator Author

bundle exec rspec ./spec/features/templates/templates_copying_spec.rb:26

This problem is also appearing on Ubuntu OS now.

@aaronskiba
Copy link
Collaborator Author

The following Stack Overflow answer solved the problem: https://stackoverflow.com/a/45198164

"Odds are that you have previously precompiled the assets in the test environment and that a left over manifest file is preventing it from recompiling newly added assets. You can fix that by running something like

RAILS_ENV=test rake assets:clobber"

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

1 participant