title: Selenium py - Process unexpectedly closed with status 255
body: <p>I'm trying to run a python script in a docker container. The script contains selenium commands. I'm trying to use headless Firefox. When I run the script, I get this error:</p>
  <pre class="lang-py prettyprint-override"><code>Traceback (most recent call last):
    File &quot;/usr/bin/setup.py&quot;, line 19, in &lt;module&gt;
      driver = webdriver.Firefox(options=options)
    File &quot;/usr/local/lib/python3.10/site-packages/selenium/webdriver/firefox/webdriver.py&quot;, line 179, in __init__
      RemoteWebDriver.__init__(
    File &quot;/usr/local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py&quot;, line 268, in __init__
      self.start_session(capabilities, browser_profile)
    File &quot;/usr/local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py&quot;, line 359, in start_session
      response = self.execute(Command.NEW_SESSION, parameters)
    File &quot;/usr/local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py&quot;, line 424, in execute
      self.error_handler.check_response(response)
    File &quot;/usr/local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py&quot;, line 247, in check_response
      raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 255
  </code></pre>
  <p>The versions are as follows:</p>
  <ul>
  <li>python 3.10</li>
  <li>selenium 4.1.0</li>
  <li>firefox  91.5.1</li>
  <li>geckodriver 0.30.0</li>
  </ul>
  <p>I install Firefox and geckodriver via the Dockerfile.</p>
  <pre class="lang-dockerfile prettyprint-override"><code>#=================
  # Install Firefox
  #=================
  RUN apt-get -qy --no-install-recommends install \
      $(apt-cache depends firefox | grep Depends | sed &quot;s/.*ends:\ //&quot; | tr '\n' ' ')
  RUN rm -rf /var/lib/apt/lists/*
  RUN wget --no-check-certificate -O /tmp/firefox-esr.tar.bz2 'https://download.mozilla.org/?product=firefox-esr-latest&amp;os=linux64&amp;lang=en-US'
  RUN tar -xjf /tmp/firefox-esr.tar.bz2 -C /opt/ &amp;&amp; \
      ln -s /opt/firefox/firefox /usr/bin/firefox &amp;&amp; \
      rm -f /tmp/firefox-esr.tar.bz2
      
  #=================
  # Install Geckodriver
  #=================
  RUN curl -fL -o /tmp/geckodriver.tar.gz \
          https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
  RUN tar -xzf /tmp/geckodriver.tar.gz -C /tmp/ &amp;&amp; \
      chmod +x /tmp/geckodriver &amp;&amp; \
      mv /tmp/geckodriver /usr/bin/geckodriver
  </code></pre>