title: Selenium Geckodriver Firefox not working in a CRONTAB, work on terminal
body: <p>I have a very simple python code that has stopped working recently only when running in a cron. </p>
  
  <p>basically, this is how it began:</p>
  
  <pre><code>from selenium import webdriver
  from pyvirtualdisplay import Display
  from selenium.webdriver.firefox.options import Options
  
  display = Display(visible=0, size=(1000, 1000))
  display.start()
  
  url = "https://www.exemple.com/admin"
  opts= Options()
  opts.headless = True
  driver = webdriver.Firefox(options=opts)
  
  driver.get(url)
  </code></pre>
  
  <p>This raise an error :</p>
  
  <pre><code>selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process
  </code></pre>
  
  <p>The geckodriver logs are :</p>
  
  <pre><code>1586945401577   mozrunner::runner   INFO    Running command: "/usr/bin/firefox" "-marionette" "-headless" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileYPmycq"
  *** You are running in headless mode.
  1586945401858   addons.webextension.doh-rollout@mozilla.org WARN    Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
  1586945401873   addons.webextension.screenshots@mozilla.org WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
  1586945401873   addons.webextension.screenshots@mozilla.org WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
  1586945401873   addons.webextension.screenshots@mozilla.org WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
  1586945401873   addons.webextension.screenshots@mozilla.org WARN    Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
  Exiting due to channel error.
  Exiting due to channel error.
  </code></pre>
  
  <p>Geckodriver version: 0.26
  Firefox version: 76.0b4
  Python version: 3.6
  Selenium version: 3.14.1</p>
  
  <p>Therefor, I think there is no incompatibility problems.
  Gecko is executable for all users, and is located in /usr/bin/.</p>
  
  <p>I checked all information find here <a href="https://stackoverflow.com/questions/52534658/webdriverexception-message-invalid-argument-cant-kill-an-exited-process-with">WebDriverException: Message: invalid argument: can&#39;t kill an exited process with GeckoDriver, Selenium and Python on RaspberryPi3</a></p>
  
  <p>I also tried to launch firefox alone from terminal, by adding DISPLAY:=10 and that worked. </p>
  
  <p>The script work fine from terminal, but once in the CRONTAB, I have the error above.</p>
  
  <p>Also, I killed all firefox process before running.</p>