Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Initialization Driver, versions #684

Open
JonasZaoui2 opened this issue Nov 1, 2024 · 1 comment
Open

Error Initialization Driver, versions #684

JonasZaoui2 opened this issue Nov 1, 2024 · 1 comment

Comments

@JonasZaoui2
Copy link

Hello !
When i run my script locally, it's running, but when i use docker container, i got this error :

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 130.0.6723.69 with binary path /usr/bin/chromium

This is my Dockerfile ;

FROM python:3.12-slim
RUN apt-get update && apt-get install -y \
    libglib2.0-0 \
    libnss3 \
    libgconf-2-4 \
    libfontconfig1 \
    ffmpeg \
    libsm6 \
    libxext6 \ 
    chromium

RUN pip install poetry
RUN poetry config virtualenvs.create false
WORKDIR /app 
COPY pyproject.toml poetry.lock ./ 
RUN poetry install --no-dev
EXPOSE 5000

And this is my line error code :

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

I dont understand why webdiver-manager did not deal with version mismatching, and how fix this error.

Thanks

@JonasZaoui2
Copy link
Author

I add those lines to the Dockerfile,

RUN apt-get install -y wget
RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb

And now it's running. But i got an error of crashing page.. it's running locally, but on Docker container crashing error appeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant