問題描述
我在運行我的場景時遇到以下錯誤.
<塊引用>org.openqa.selenium.TimeoutException: timeout: 接收超時來自渲染器的消息:10.000
(會話信息:chrome=79.0.3945.79)構建信息:版本:'3.14.0',修訂:'aacccce0',時間:'2018-08-02T20:19:58.91Z' 系統信息:主機:'fv-az598',ip:'10.1.0.4',os.name:'Linux',os.arch:'amd64',os.version:4.15.0-1064-azure",java.version:1.8.0_212"驅動程序信息:org.openqa.selenium.remote.RemoteWebDriver 功能{acceptInsecureCerts: false, browserName: chrome, browserVersion:79.0.3945.79,鉻:{chromedriverVersion:79.0.3945.36
如您所見,使用粗體突出顯示的字體,我確實有 chrome 和 chrome 驅動程序的匹配版本.
我還向我的 ChromeOptions 傳遞了一些參數,這意味著超時的幫助:
//防止超時的選項options.addArguments("開始最大化");//https://stackoverflow.com/a/26283818/1689770options.addArguments("啟用自動化");//https://stackoverflow.com/a/43840128/1689770options.addArguments("--no-sandbox");//https://stackoverflow.com/a/50725918/1689770options.addArguments("--disable-infobars");//https://stackoverflow.com/a/43840128/1689770options.addArguments("--disable-dev-shm-usage");//https://stackoverflow.com/a/50725918/1689770options.addArguments("--disable-browser-side-navigation");//https://stackoverflow.com/a/49123152/1689770options.addArguments("--disable-gpu");//https://stackoverflow.com/questions/51959986/how-to-solve-selenium-chromedriver-timed-out-receiving-message-from-renderer-excoptions.addArguments("--disable-features=VizDisplayCompositor");//https://stackoverflow.com/questions/55373625/getting-timed-out-receiving-message-from-renderer-600-000-when-we-execute-selen
在 DOCKER 容器中運行時會發生這種情況(使用 chrome 瀏覽器的最新 docker 圖像和 node-chrome-debug)
任何想法將不勝感激.
這個錯誤信息...
org.openqa.selenium.TimeoutException:超時:從渲染器接收消息超時:10.000
...暗示 ChromeDriver 無法啟動/生成新的瀏覽上下文,即 Chrome 瀏覽器 會話.
您的主要問題是您使用的二進制文件版本之間的不兼容性,如下所示:
- 您的 Selenium Client 版本是 2018-08-02T20:19:58.91Z 的 3.14.0,幾乎是 1.5 歲,并發 ChromeDriver 兼容 OSS.
- 您正在使用 chromedriver=79.0
- 您正在使用 chrome=79.0
- 雖然 chromedriver=79.0 和 chrome=79.0 是并發的,但是它們與 Selenium Client 版本不兼容 3.14.0.
因此 Selenium Client v3.14.0 、ChromeDriver v79.0 和 Chrome 瀏覽器 v79.0 之間存在明顯的不匹配p><小時>
解決方案
確保:
- JDK 升級到當前級別 JDK 8u222.
- Selenium 已升級到當前級別版本 3.141.59.
- 清理你的項目工作區通過你的IDE和重建你的項目只需要依賴.
tl;博士
您可以在以下位置找到一些相關討論:
- 從渲染器接收消息超時
- 錯誤 [嚴重]:接收來自渲染器的消息超時:20.000 在 Jenkins 上通過 Selenium 執行測試套件時
I am getting following error when running my scenarios.
org.openqa.selenium.TimeoutException: timeout: Timed out receiving message from renderer: 10.000
(Session info: chrome=79.0.3945.79) Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z' System info: host: 'fv-az598', ip: '10.1.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-1064-azure', java.version: '1.8.0_212' Driver info: org.openqa.selenium.remote.RemoteWebDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 79.0.3945.79, chrome: {chromedriverVersion: 79.0.3945.36
As you can see, with bold, highlighted font, I do have matching versions of the chrome and chrome driver.
I am also passing some arguments to my ChromeOptions that meant help with timeouts:
// options to prevent TIMEOUTS
options.addArguments("start-maximized"); //https://stackoverflow.com/a/26283818/1689770
options.addArguments("enable-automation"); //https://stackoverflow.com/a/43840128/1689770
options.addArguments("--no-sandbox"); //https://stackoverflow.com/a/50725918/1689770
options.addArguments("--disable-infobars"); //https://stackoverflow.com/a/43840128/1689770
options.addArguments("--disable-dev-shm-usage"); //https://stackoverflow.com/a/50725918/1689770
options.addArguments("--disable-browser-side-navigation"); //https://stackoverflow.com/a/49123152/1689770
options.addArguments("--disable-gpu"); //https://stackoverflow.com/questions/51959986/how-to-solve-selenium-chromedriver-timed-out-receiving-message-from-renderer-exc
options.addArguments("--disable-features=VizDisplayCompositor"); //https://stackoverflow.com/questions/55373625/getting-timed-out-receiving-message-from-renderer-600-000-when-we-execute-selen
Edit: it happens when running in DOCKER container (using LATEST docker images for chrome browser, and node-chrome-debug)
Any ideas will be greatly appreciated.
This error message...
org.openqa.selenium.TimeoutException: timeout: Timed out receiving message from renderer: 10.000
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- Your Selenium Client version is 3.14.0 of 2018-08-02T20:19:58.91Z which is almost 1.5 years older andthe concurrent ChromeDriver was OSS compliant.
- You are using chromedriver=79.0
- You are using chrome=79.0
- Though chromedriver=79.0 and chrome=79.0 are concurrent but they are incompatible with Selenium Client version is 3.14.0.
So there is a clear mismatch between Selenium Client v3.14.0 , ChromeDriver v79.0 and the Chrome Browser v79.0
Solution
Ensure that:
- JDK is upgraded to current levels JDK 8u222.
- Selenium is upgraded to current levels Version 3.141.59.
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
tl; dr
You can find a couple of relevant discussions in:
- Timed out receiving message from renderer
- Error [SEVERE]: Timed out receiving message from renderer: 20.000 while executing the testsuite through Selenium on Jenkins
這篇關于從渲染器接收消息超時:10.000的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!