-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
What happened?
2023-02-28 10:15:01 INFO {'User-Agent': 'Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.8) Gecko/20050512 Firefox/1.0.4'}
2023-02-28 10:20:03 ERROR http://www.xxxx.com Connected failure: Message: timeout: Timed out receiving message from renderer: 298.411
(Session info: chrome=110.0.5481.177)
Stacktrace:
#0 0x560d78979d93
#1 0x560d787482d7
#2 0x560d787326d3
#3 0x560d78732404
#4 0x560d78730ee2
#5 0x560d78731682
#6 0x560d7873eb4f
#7 0x560d7873f7a2
#8 0x560d7874fba0
#9 0x560d78753e40
#10 0x560d78731b43
#11 0x560d7874f97e
#12 0x560d787c083a
#13 0x560d787a8353
#14 0x560d78777e40
#15 0x560d78779038
#16 0x560d789cd8be
#17 0x560d789d18f0
#18 0x560d789b1f90
#19 0x560d789d2b7d
#20 0x560d789a3578
#21 0x560d789f7348
#22 0x560d789f74d6
#23 0x560d78a11341
#24 0x7f8c77be6ea7 start_thread
How can we reproduce the issue?
proxy = get_proxy()
s = Service("/usr/local/bin/chromedriver")
chrome_options = Options()
torrents_path = torrents_path_prefix + fid
logging.info('torrents_path: ' + torrents_path)
prefs = {'savefile.default_directory': torrents_path}
chrome_options.add_experimental_option('prefs', prefs)
chrome_options.add_argument('--headless=new')
user_agent = get_random_user_agent()['User-Agent']
chrome_options.add_argument(f'user-agent={user_agent}')
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--proxy-server=' + proxy['http'])
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--aggressive-cache-discard')
chrome_options.add_argument('--disable-cache')
chrome_options.add_argument('--disable-application-cache')
chrome_options.add_argument('--disable-offline-load-stale-cache')
chrome_options.add_argument('--disable-gpu-shader-disk-cache')
chrome_options.add_argument('--media-cache-size=0')
chrome_options.add_argument('--disk-cache-size=0')
chrome_options.add_experimental_option("excludeSwitches", ['enable-automation', 'enable-logging'])
driver = webdriver.Chrome(service=s, options=chrome_options)
try:
driver.get(url)
sleep(radmon_sleep)
driver.find_element(
"xpath", "//button[@type='submit'][@title='Download file']").click()
sleep(radmon_sleep)
driver.maximize_window()
driver.quit()
except Exception as e:
logging.error(url + " Connected failure: %s" % e)
return False
else:
logging.info(url + ' sucess saved.')
redis_download_set(url)
return TrueRelevant log output
pls check below
FROM python:3.7
# install google chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
RUN apt-get -y update
RUN apt-get install -y google-chrome-stable
# install chromedriver
RUN apt-get install -yqq unzip
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
# set display port to avoid crash
ENV DISPLAY=:99
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
# add cron to delete chromedriver cache data under /tmp
RUN apt-get install -y cron
ADD crontabfile /etc/cron.daily/spider-cron
RUN crontab /etc/cron.daily/spider-cron
RUN chmod 755 /etc/cron.daily/*
RUN touch /var/log/cron.log
CMD service cron start && cd /app && python3 torrents_download.pyOperating System
Docker python:3.7
Selenium version
ChromeDriver 110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839})
What are the browser(s) and version(s) where you see this issue?
Google Chrome 110.0.5481.177
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839})
Are you using Selenium Grid?
No response