相关文章推荐
逆袭的毛衣  ·  PHP ...·  1 年前    · 
憨厚的烈马  ·  Web 框架 mojo.js 1.0 ...·  2 年前    · 

Message: timeout: Timed out receiving message from renderer with Chrome 113 #1280

@agrpdrlm

Description

Hello,

I have the following Python code that worked fine a few weeks ago.

Now it fails and I am struggling to understand why. Error is: TimeoutException: Message: timeout: Timed out receiving message from renderer.

I am using the following versions (latest):

  • OS: Ubuntu
  • Chrome version : 113.0.5672.126
  • Undetected Chromedriver : 3.4.7
  • Selenium: 4.9.1
  • The code works fine on my desktop but fails on Github Actions even though it used to work.

    From what I understand, this error often occur when there is a missmatch between the Chrome driver and Chrome - but i'm using the latest versions here.

    Is the current version Undetected Chromedriver not compatible with the latest version of Chrome (113.0.5672.126)?

    pip
    
    
    
    
        
     install beautifulsoup4 webdriver-manager selenium undetected-chromedriver
    ###############################################################
    # Selenium
    from selenium import webdriver 
    from selenium.webdriver.support.ui import Select 
    from selenium.webdriver.support.ui import WebDriverWait 
    from selenium.webdriver.support import expected_conditions as EC   
    from selenium.webdriver.chrome.service import Service
    from webdriver_manager.chrome import ChromeDriverManager
    from selenium.webdriver.common.by import By  
    # BeautifulSoup
    from bs4 import BeautifulSoup as soup  
    # undetected_chromedriver 
    import undetected_chromedriver as uc
    ###############################################################
    # To configure
    url_to_scrap = 'http://google.com'
    # Configure undetected_chrome
    options = uc.ChromeOptions()
    options.add_argument('--headless')
    driver = uc.Chrome(options=options, version_main=112)
    # Open URL
    driver.get(url_to_scrap)
    Traceback (most recent call last):
      File "/XXX/scrapper_bots/test.py", line 28, in <module>
        driver.get(url_to_scrap)
      File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/undetected_chromedriver/__init__.py", line 621, in get_wrapped
        return orig_get(*args, **kwargs)
      File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/undetected_chromedriver/__init__.py", line 657, in get
        return super().get(url)
      File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 449, in get
        self.execute(Command.GET, {"url": url})
      File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute
        self.error_handler.check_response(response)
      File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response
        raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.TimeoutException: Message: timeout: Timed out receiving message from renderer: -302.674
      (Session info: chrome=113.0.5672.0)
    Stacktrace:
    #0 0x55c3cc071fe3 <unknown>
    #1 0x55c3cbdb0d36 <unknown>
    #2 0x55c3cbd9ae14 <unknown>
    #3 0x55c3cbd9ab30 <unknown>
    #4 0x55c3cbd99608 <unknown>
    #5 0x55c3cbd99db2 <unknown>
    #6 0x55c3cbda7283 <unknown>
    #7 0x55c3cbda82c2 <unknown>
    #8 0x55c3cbdb84db <unknown>
    #9 0x55c3cbdbc4eb <unknown>
    #10 0x55c3cbd9a273 <unknown>
    #11 0x55c3cbdb82a3 <unknown>
    Error: Process completed with exit code 1.