WebDriverException: Message: invalid argument: can’t kill an exited process with GeckoDriver, Selenium and Python on RaspberryPi3

If you are running Firefox on a system with no display, make sure you use headless mode.

from selenium import webdriver
from selenium.webdriver.firefox.options import Options

options = Options()
options.headless = True
driver = webdriver.Firefox(options=options)

Also, make sure you have compatible versions of Firefox, Selenium, and Geckodriver:
https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html

Leave a Comment