Elixir Wallaby and Chromedriver issue: (RuntimeError) invalid session id

 1) feature does X (BaseApp.UIWeb.Test.Acceptance.TheTest)
     apps/ui/test/ui_web/acceptance/the_testexs:13
     ** (RuntimeError) invalid session id
     code: |> session_login()
     stacktrace:
       (wallaby) lib/wallaby/httpclient.ex:136: Wallaby.HTTPClient.check_for_response_errors/1
       (wallaby) lib/wallaby/httpclient.ex:56: Wallaby.HTTPClient.make_request/5
       (wallaby) lib/wallaby/webdriver_client.ex:254: Wallaby.WebdriverClient.visit/2
       (wallaby) lib/wallaby/driver/log_checker.ex:6: Wallaby.Driver.LogChecker.check_logs!/2
       (wallaby) lib/wallaby/browser.ex:963: Wallaby.Browser.visit/2
       (ui) test/support/acceptance/rivendell_wallaby_session.ex:73: Rivendell.UIWeb.Test.Support.Acceptance.RivendellWallabySession.session_login/1

The solution for this was to run: brew upgrade chromedriver (this used to be brew cask upgrade chromedriver). You may possibly need to update your chrome browser. The comments on this issue/repo were very helpful: https://github.com/elixir-wallaby/wallaby/issues/468.

Generally, it would seem it is a good idea to keep your chromedriver in sync with your updates to Chrome (run brew upgrade chromedriver when you update Chrome.

More general errors will likely be an issue with your local code as opposed to Wallaby or package dependencies 🙂 See: https://n8williams.com/devblog/general_dev/elixir-wallaby-uncaught-javascript-error