Selenium on streamlit error webdriver

Please help how to run automation on streamlit.

i got this error when start on installing chromedriver to streamlit cloud the selnium webdriver not open.

This is my streamlit website that have automation.

this is the error

selenium.common.exceptions.WebDriverException: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).


File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 565, in _run_script
    exec(code, module.__dict__)File "/app/digital-ocean-automation/", line 866, in <module>
    main()File "/app/digital-ocean-automation/", line 80, in main
    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),options=options)File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/chrome/", line 84, in __init__
    super().__init__(File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/chromium/", line 104, in __init__
    super().__init__(File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/remote/", line 286, in __init__
    self.start_session(capabilities, browser_profile)File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/remote/", line 378, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/remote/", line 440, in execute
    self.error_handler.check_response(response)File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/remote/", line 245, in check_response
    raise exception_class(message, screen, stacktrace)

This is ther error on the streamlit log
Hit:1 bullseye InRelease

Get:2 bullseye-security InRelease [48.4 kB]

Get:3 stable-security/updates InRelease [48.4 kB]

Get:4 bullseye-updates InRelease [44.1 kB]

Hit:5 buster InRelease

Fetched 141 kB in 0s (322 kB/s)

Reading package lists...[2023-05-31 05:28:32.138737] 

Reading package lists...[2023-05-31 05:28:32.721854] 

Building dependency tree...[2023-05-31 05:28:32.893094] 

Reading state information...[2023-05-31 05:28:32.893538] 

chromium is already the newest version (113.0.5672.126-1~deb11u1).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

[05:28:33] 📦 Processed dependencies!

[05:28:33] ❗️ The service has encountered an error while checking the health of the Streamlit app: Get "http://localhost:8501/healthz": dial tcp connect: connection refused

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.

[05:28:37] 🔄 Updated app!

2023-05-31 05:31:07.072 Uncaught app exception

Traceback (most recent call last):

  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 565, in _run_script

    exec(code, module.__dict__)

  File "/app/digital-ocean-automation/", line 866, in <module>


  File "/app/digital-ocean-automation/", line 80, in main

    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),options=options)

  File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/chrome/", line 84, in __init__


  File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/chromium/", line 104, in __init__


  File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/remote/", line 286, in __init__

    self.start_session(capabilities, browser_profile)

  File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/remote/", line 378, in start_session

    response = self.execute(Command.NEW_SESSION, parameters)

  File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/remote/", line 440, in execute


  File "/home/appuser/venv/lib/python3.9/site-packages/selenium/webdriver/remote/", line 245, in check_response

    raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.

  (unknown error: DevToolsActivePort file doesn't exist)

  (The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)


This is my gitrepo can you check my code

please help me...[My strealit code with selenium automation](

Hi @jerhome12

Looking through the error, seems to suggest that the error most likely comes from the following:

Can you look into this in more depth. Here are some possible solutions in this thread:

Hope this helps!

Best regards,

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.