Q:

Selenium has stopped working, chrome versions do not match

On my CI, selenium started failing recently with:
selenium.common.exceptions.WebDriverException: Message: chrome not reachable
  (Session info: headless chrome=73.0.3683.75)
  (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.4.0-141-generic x86_64)

This is in a django SeleniumTestCase, with a custom webdriver as follows:
class WebDriver(web_driver_module.WebDriver):
    """Our own WebDriver with some helpers added"""

    def __init__(self, *args, **kwargs):
        chrome_options = kwargs.get("chrome_options", Options())
        chrome_options.add_argument("--headless")
        chrome_options.add_argument("--no-sandbox")
        chrome_options.add_argument("--disable-dev-shm-usage")
        kwargs["chrome_options"] = chrome_options
        super().__init__(*args, **kwargs)

The weird thing is that when I apt install chromedriver (beforehand) I get the following:
Preparing to unpack .../36-chromium_72.0.3626.122-1~deb9u1_amd64.deb ...
which is a different version from that referenced in the WebDriverException. What is going on?

A:

This was not to do with the Chrome version or location, the stuff in __init__ is no longer required it seems, and some part of it was not compatible with the latest Chrome. Removing the entire chrome_options section fixed this.

