Selenium error "Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist)"

I am using selenium in Python, which requires the chromedriver and chrome binary to be installed on the server.

How can I accomplish this?

Here is what I have so far, but on the server I see error:
“Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn’t exist) (The process started from chrome location /opt/render/project/bin/chrome/opt/google/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)”

Here is my Python file:

import os

from dotenv import load_dotenv

from selenium import webdriver
from import Service
from selenium.webdriver.common.keys import Keys


# default path for homebrew-installed chromedriver
CHROMEDRIVER_PATH = os.getenv("CHROMEDRIVER_PATH", default="/usr/local/bin/chromedriver")
CHROME_BINARY_PATH = os.getenv("CHROME_BINARY_PATH") # specify path where chrome binary is installed, as necessary (see "")
HEADLESS_MODE = bool(os.getenv("HEADLESS_MODE", default="false") == "true")

def create_driver(headless=HEADLESS_MODE, chromedriver_path=CHROMEDRIVER_PATH, binary_location=CHROME_BINARY_PATH):

    options = webdriver.ChromeOptions()
    # help Mac find where you installed Chrome
    # help production server find custom installation of chrome binary (see ""):
    if binary_location:
        options.binary_location = binary_location
    if headless:

    #return webdriver.Chrome(chromedriver_path, options=options)

    service = Service(executable_path=chromedriver_path)
    return webdriver.Chrome(service=service, options=options)

if __name__ == "__main__":

    driver = create_driver()


Environment variables set on the server:


Here is my file:


if [[ ! -d $CHROME_PATH ]]; then

    echo "...Downloading Chrome Binary..."
    #wget <uri> -P /path/to/folder
    wget -P /tmp

    echo "...Installing Chrome Binary..."
    mkdir -p /opt/render/project/bin/chrome
    dpkg -x /tmp/google-chrome-stable_current_amd64.deb /opt/render/project/bin/chrome
    # this is a directory with its own "etc", "opt", and "usr" subdir

    echo "...Cleaning Up..."
    rm /tmp/google-chrome-stable_current_amd64.deb

    echo "...Adding to Path..."
    #export PATH="${PATH}:${CHROME_PATH}/opt/google/chrome/"
    export PATH="${PATH}:/opt/render/project/bin/chrome/opt/google/chrome"

  echo "...Detected Existing Chrome Binary"


if [[ ! -d $CHROMEDRIVER_PATH ]]; then

    echo "...Downloading Chromedriver..."
    wget -O /tmp/`curl -sS`/

    echo "...Installing Chromedriver..."
    unzip /tmp/ chromedriver -d /opt/render/project/bin

    echo "...Cleaning Up..."
    rm /tmp/

    echo "...Adding to Path..."
    echo $PATH
  echo "...Detected Existing Chromedriver Installation"

echo "...Installing packages..."
pip install -r requirements.txt

echo "...Build Script Completed!"


Can you check this previous community topic: and let me know if that helped you installing Chrome?

Render Support, UTC+3

As you can see I based my solution off of the code in that post. And I’m experiencing the error I mentioned. So I guess what I’m hoping from you is actually dig in a bit to help me fix it.

Furthermore since setting up selenium in Python is such a common use case, I would hope Render would give users a good experience by preparing a document that walks users through how to do it. Other platforms provide “buildpacks” / plugins to help with common use cases like this.


There are two probable scenarios unfolding. Firstly, as outlined in the instructions found here:, it seems that Chrome isn’t accessible via your ‘PATH’ due to the absence of an export statement in your start command.

Secondly, a disparity in major versions between your chrome and chromedriver could potentially give rise to problems.

If you desire a more in-depth investigation, kindly use the “Contact Support” form within the dashboard to get in touch.

Render Support, UTC+3

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