未知错误:无法确定从断开连接加载的状态:无法从呈现程序接收消息jenkins上的Selenium Java脚本错误

未知错误:无法确定从断开连接加载的状态:无法从呈现程序接收消息jenkins上的Selenium Java脚本错误,java,selenium,google-chrome,jenkins,selenium-chromedriver,Java,Selenium,Google Chrome,Jenkins,Selenium Chromedriver,我正在学习如何使用maven和eclipse在jenkins服务器上创建和运行java-selenium脚本的教程 我的脚本非常基本,通过maven和TestNG在eclipse中运行时在本地运行良好。 当我在Jenkins上运行它们时,构建需要3分钟到15分钟,然后失败,通常会出现超时渲染问题 我的脚本在本地运行时最多只需要2分钟 以前有人有过这个问题吗? 我不知道他们为什么超时 詹金斯的错误 我的剧本 此错误消息 unknown error: cannot determine loading

我正在学习如何使用maveneclipse在jenkins服务器上创建和运行java-selenium脚本的教程

我的脚本非常基本,通过maven和TestNG在eclipse中运行时在本地运行良好。 当我在Jenkins上运行它们时,构建需要3分钟到15分钟,然后失败,通常会出现超时渲染问题

我的脚本在本地运行时最多只需要2分钟

以前有人有过这个问题吗? 我不知道他们为什么超时

詹金斯的错误 我的剧本 此错误消息

unknown error: cannot determine loading status from disconnected: Unable to receive message from renderer   (Session info: chrome=78.0.3904.108)   (Driver info: chromedriver=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 7.77 seconds Build info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26' System info: host: 'Eamons-MBP.hitronhub.home', ip: '192.168.0.23', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_101' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities [{mobileEmulationEnabled=false, timeouts={implicit=0, pageLoad=300000, script=30000}, hasTouchScreen=false, platform=MAC, acceptSslCerts=false, goog:chromeOptions={debuggerAddress=localhost:60317}, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=ignore, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}), userDataDir=/var/folders/q3/3hrl35417q113_mhrglxf5cw00008b/T/.com.google.Chrome.Opshna}, takesHeapSnapshot=true, pageLoadStrategy=normal, strictFileInteractability=false, databaseEnabled=false, handlesAlerts=true, version=78.0.3904.108, browserConnectionEnabled=false, proxy={}, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}] Session ID: 7261e3005842ddc3d850504ba249d136
Stacktrace
org.openqa.selenium.WebDriverException: unknown error: cannot determine loading status
from disconnected: Unable to receive message from renderer
  (Session info: chrome=78.0.3904.108)
  (Driver info: chromedriver=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 7.77 seconds
Build info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26'
System info: host: 'Eamons-MBP.hitronhub.home', ip: '192.168.0.23', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.chrome.ChromeDriver
.
Standard Error
Starting ChromeDriver 78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}) on port 40247
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1574697681.040][WARNING]: Timed out connecting to Chrome, retrying...
[1574697692.398][SEVERE]: Unable to receive message from renderer
…意味着ChromeDriver无法启动/生成新的网络浏览器,即Chrome浏览器会话

您的主要问题是所使用的二进制文件版本之间的不兼容,如下所示:

  • 您使用的是chromedriver=78.0.3904.105
  • 您使用的是chrome=78.0.3904.108
  • 您的Selenium客户端版本是2015-02-27 09:10:26的2.45.0,它是古老的,并且几乎比它早了5年
  • 您的JDK版本是1.8.0_101,非常古老
因此,JDK v8u101、Selenium客户端v2.45.0、ChromeDriver v78.0和Chrome浏览器v78.0之间存在明显的不匹配


解决方案 确保:

  • JDK已升级到当前级别
  • 硒被提升到当前水平
  • 通过IDE清理项目工作区,并仅使用所需的依赖项重建项目
  • 如果您的基本Web客户端版本太旧,请通过卸载它并安装最新的GA和Web客户端发布版本
  • 重新启动系统
  • 以非root用户身份执行
    @Test

您好,我已经将JDK更新为最新版本,将selenium更新为最新版本,清理并重新构建了我的项目,但我仍然收到了关于超时的相同错误。chrome和chromer驱动程序的微小差异肯定不是我出现这个错误的原因?
   @Test
   public class NewTest {

        @Test
         public void doSomething() {

        System.setProperty("webdriver.chrome.driver","/Users/Eamon/Desktop/chromedriver");
        WebDriver driver = new ChromeDriver();
        driver.manage().window().maximize();

        JavascriptExecutor js = (JavascriptExecutor) driver;


        String baseUrl = "http://www.nfl.com/probowl/ballot";
        //"http://www.nfl.com/probowl/ballot";
        driver.get(baseUrl);
        driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);

        WebElement html = driver.findElement(By.tagName("html"));
        html.sendKeys(Keys.chord(Keys.CONTROL, Keys.ADD));
        html.sendKeys(Keys.chord(Keys.CONTROL, "25"));

        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

        js.executeScript("window.scrollBy(0,500)");
        driver.findElement(By.id("1015811_13_1_10")).click();

        js.executeScript("window.scrollBy(0,1000)");
        driver.findElement(By.id("ballot-submit")).click();

        driver.close();
        driver.quit();
         }

}
unknown error: cannot determine loading status from disconnected: Unable to receive message from renderer   (Session info: chrome=78.0.3904.108)   (Driver info: chromedriver=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 7.77 seconds Build info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26' System info: host: 'Eamons-MBP.hitronhub.home', ip: '192.168.0.23', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_101' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities [{mobileEmulationEnabled=false, timeouts={implicit=0, pageLoad=300000, script=30000}, hasTouchScreen=false, platform=MAC, acceptSslCerts=false, goog:chromeOptions={debuggerAddress=localhost:60317}, acceptInsecureCerts=false, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=ignore, applicationCacheEnabled=false, rotatable=false, networkConnectionEnabled=false, chrome={chromedriverVersion=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}), userDataDir=/var/folders/q3/3hrl35417q113_mhrglxf5cw00008b/T/.com.google.Chrome.Opshna}, takesHeapSnapshot=true, pageLoadStrategy=normal, strictFileInteractability=false, databaseEnabled=false, handlesAlerts=true, version=78.0.3904.108, browserConnectionEnabled=false, proxy={}, nativeEvents=true, locationContextEnabled=true, cssSelectorsEnabled=true}] Session ID: 7261e3005842ddc3d850504ba249d136
Stacktrace
org.openqa.selenium.WebDriverException: unknown error: cannot determine loading status
from disconnected: Unable to receive message from renderer
  (Session info: chrome=78.0.3904.108)
  (Driver info: chromedriver=78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}),platform=Mac OS X 10.13.6 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 7.77 seconds
Build info: version: '2.45.0', revision: '5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26'
System info: host: 'Eamons-MBP.hitronhub.home', ip: '192.168.0.23', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.chrome.ChromeDriver
.
Standard Error
Starting ChromeDriver 78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e0e07ee2-refs/branch-heads/3904@{#877}) on port 40247
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1574697681.040][WARNING]: Timed out connecting to Chrome, retrying...
[1574697692.398][SEVERE]: Unable to receive message from renderer