'Undetected Chromedriver Crashing Unexpectedly

I'm trying to create a program that logs into google by using undetected-chromedriver. I'm running this on Replit but it crashes directly after opening google.

import undetected_chromedriver as uc

chrome_options = uc.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')

driver = uc.Chrome(options=chrome_options)
driver.get('https://mail.google.com')

This is the error that it returns:

Traceback (most recent call last):
  File "main.py", line 7, in <module>
    driver = uc.Chrome(options=chrome_options)
  File "/home/runner/Undetected-Chromedriver/venv/lib/python3.8/site-packages/undetected_chromedriver/__init__.py", line 401, in __init__
    super(Chrome, self).__init__(
  File "/home/runner/Undetected-Chromedriver/venv/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 70, in __init__
    super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
  File "/home/runner/Undetected-Chromedriver/venv/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py", line 89, in __init__
    self.service.start()
  File "/home/runner/Undetected-Chromedriver/venv/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 98, in start
    self.assert_process_still_running()
  File "/home/runner/Undetected-Chromedriver/venv/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 110, in assert_process_still_running
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: Service /home/runner/.local/share/undetected_chromedriver/36af9f1b1cb26672_chromedriver unexpectedly exited. Status code was: 127

screen output

Is there a fix to this problem or another method that can get me logged into Google?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source