title: Google Cloud Function (2nd) + Python Selenium - Chrome failed to start: exited abnormally
body: <p>I have the same error as this post:</p>
  <p><a href="https://stackoverflow.com/questions/54715078/webdriverexception-message-unknown-error-chrome-failed-to-start-exited-abnor">WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally with ChromeDriver Chrome and Selenium through Python on VPS</a></p>
  <p>Howerver it seems as I have different issue - managing versions does not solve it.</p>
  <p>I am trying to use Google Cloud Functions (2nd tear which is based on Cloud Run) to run Seleniu.</p>
  <p>My code is just the basic one:</p>
  <p>main.py:</p>
  <pre><code>def hello_world(request):
    print(&quot;Start&quot;)
    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options
    from chromedriver_py import binary_path
    from selenium import webdriver
    from selenium.webdriver.chrome.service import Service
    from webdriver_manager.chrome import ChromeDriverManager
    chrome_options = Options()
    chrome_options.binary_location=binary_path
    chrome_options.add_argument(&quot;--remote-debugging-port=9222&quot;)
    chrome_options.add_argument(&quot;--headless&quot;)
    chrome_options.add_argument(&quot;--disable-gpu&quot;)
    chrome_options.add_argument(&quot;--window-size=1920x1080&quot;)
    chrome_options.add_argument('--no-sandbox')
    chrome_options.add_argument('--disable-extensions')
    driver = webdriver.Chrome(options=chrome_options,service=Service(ChromeDriverManager().install()))
    driver.get(&quot;https://www.google.com&quot;)
    print(driver.title)
    driver.close()
    print(&quot;End&quot;)
  return &quot;Empty - nothing&quot;
  </code></pre>
  <p>requirements.txt:</p>
  <pre><code>selenium &gt;= 4.2.0
  webdriver-manager &gt;= 3.7.0
  chromedriver_py &gt;= 103.0.5060.24
  </code></pre>
  <p>It gives error: &quot;selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally&quot;</p>
  <p>Has anyone figured it out?</p>
  <p>I found information that cloud functions does not work with Selenium:
  <a href="https://stackoverflow.com/questions/70661914/can-i-use-selenium-webdriver-with-google-cloud-functions">Can I use Selenium WebDriver with Google Cloud Functions?</a></p>
  <p>However I set it on 2nd gen environment, which is based on Cloud Run, so I wish there is a way to make it work...</p>