antonengelhardt / kicktipp-bot

A bot which can submit tips for a Kicktipp competition based on quotes.
MIT License
15 stars 5 forks source link

incompatible chromedriver version #24

Closed martin-git closed 4 months ago

martin-git commented 5 months ago

Using the docker image from the readme, I get an error about incompatible chromedriver versions:

The chromedriver version (114.0.5735.90) detected in PATH at /usr/local/bin/chromedriver might not be compatible with the detected chrome version (122.0.6261.69); currently, chromedriver 122.0.6261.128 is recommended for chrome 122.*, so it is advised to delete the driver in PATH and retry
An error occured: Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 122.0.6261.69 with binary path /usr/bin/google-chrome
Stacktrace:
#0 0x560b00b884e3 <unknown>
#1 0x560b008b7c76 <unknown>
#2 0x560b008e504a <unknown>
#3 0x560b008e04a1 <unknown>
#4 0x560b008dd029 <unknown>
#5 0x560b0091bccc <unknown>
#6 0x560b0091b47f <unknown>
#7 0x560b00912de3 <unknown>
#8 0x560b008e82dd <unknown>
#9 0x560b008e934e <unknown>
#10 0x560b00b483e4 <unknown>
#11 0x560b00b4c3d7 <unknown>
#12 0x560b00b56b20 <unknown>
#13 0x560b00b4d023 <unknown>
#14 0x560b00b1b1aa <unknown>
#15 0x560b00b716b8 <unknown>
#16 0x560b00b71847 <unknown>
#17 0x560b00b81243 <unknown>
#18 0x7fc32cddf134 <unknown>

11.06.24 06:26: The script has finished. Sleeping for 1 hour...
antonengelhardt commented 5 months ago

Thanks for reporting! I haven't had much time for this project lately, but i will try to take a look in the next days. I believe i have fixed this in the past, but the opened a PR yet.

In the meantime, you can try the following Dockerfile with the command: docker buildx build --platform linux/amd64 -f Dockerfile -t antonengelhardt/kicktipp-bot:amd . && docker rm kicktipp-bot && docker run --name kicktipp-bot --platform linux/amd64 --env-file .env antonengelhardt/kicktipp-bot:amd. Remember to set up your .env with the values KICKTIPP_EMAIL, KICKTIPP_PASSWORD and KICKTIPP_NAME_OF_COMPETITION.

FROM python:3.12.4-alpine

# install chromedriver
RUN apk update
RUN apk add chromium
RUN apk add chromium-chromedriver

WORKDIR /app

# upgrade pip
RUN pip install --upgrade pip

# copy files
COPY requirements.txt requirements.txt
COPY main.py main.py
COPY game.py game.py

# Install the Python requirements
RUN pip install -r requirements.txt

CMD ["python3", "./main.py", "headless"]

For some reason, the command is not running automatically. Maybe some packages are missing. Im posting this in case you want to take a look yourself. But as i said, i'll take a look in the next days :)

antonengelhardt commented 4 months ago

@martin-git Could you check again with the latest image on GHCR (not Docker Hub)?