elixir-wallaby / wallaby

Concurrent browser tests for your Elixir web apps.
https://twitter.com/elixir_wallaby
MIT License
1.68k stars 198 forks source link

Wallaby starts in bad state when Chrome and chromedriver versions do not match #685

Closed thejohncotton closed 2 years ago

thejohncotton commented 2 years ago

When running wallaby tests if chrome/chromium and chromedriver versions do not match major, minor and build version numbers [1] you can get errors that may not make sense. Below is an example from chrome version 99.0.4844.74 and chromedriver version 97.0.4692.71:

** (RuntimeError) invalid session id
code: |> Module.view(module.token.id)
stacktrace:
  (wallaby 0.29.1) lib/wallaby/httpclient.ex:136: Wallaby.HTTPClient.check_for_response_errors/1
  (wallaby 0.29.1) lib/wallaby/httpclient.ex:56: Wallaby.HTTPClient.make_request/5
  (wallaby 0.29.1) lib/wallaby/webdriver_client.ex:329: Wallaby.WebdriverClient.visit/2
  (wallaby 0.29.1) lib/wallaby/driver/log_checker.ex:6: Wallaby.Driver.LogChecker.check_logs!/2
  (wallaby 0.29.1) lib/wallaby/browser.ex:1235: Wallaby.Browser.visit/2

[1] https://sites.google.com/chromium.org/driver/downloads/version-selection

Originally posted by @djgoku in https://github.com/elixir-wallaby/wallaby/discussions/674