ChromeDriver not working

I’m trying to deploy my app which uses chromedriver but it keeps getting this error:

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:[random port]

here’s my dockerfile:


#Download and install chrome
RUN apt-get install -y curl gnupg
RUN curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
RUN echo "deb [arch=amd64]  http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
RUN apt-get update

RUN apt-get -y install google-chrome-stable

ENV CHROMEDRIVER_VERSION 2.19
ENV CHROMEDRIVER_DIR /chromedriver
RUN mkdir $CHROMEDRIVER_DIR

# Download and install Chromedriver
RUN wget -q --continue -P $CHROMEDRIVER_DIR "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
RUN unzip $CHROMEDRIVER_DIR/chromedriver* -d $CHROMEDRIVER_DIR

`

Have you attempted this fix: Message: unknown error: cannot connect to chrome at 127.0.0.1:50276 · Issue #743 · ultrafunkamsterdam/undetected-chromedriver · GitHub?

It doesn’t look to be related to Fly itself.