English 中文(简体)
不详的错误:不能确定与下列事项脱节的装载状况: 无法收到从Selenium Java 书上误写的信息
原标题:unknown error: cannot determine loading status from disconnected: Unable to receive message from renderer error with Selenium Java scripts on jenkins

下面是关于如何使用<创建和操作java se字的指南。

My script is pretty basic and runs fine locally when ran through eclipse via maven and TestNG. When i run them on Jenkins the build takes between 3 minutes to 15 minutes and then it fails with a timeout rendering issue usually.

我的发言稿在当地只有大约2分钟。

Has anyone had this issue before? I am not sure why they timeout.

Error from Jenkins

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
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
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
    at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:304)
    at Eamon.EamonTest.doSomething(EamonTest.java:37)
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

My Script

   @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

...... Chrome()无法启动/推出新的<>WebBrowser,即Chrome Browser届会议。

您的主要议题是incompatibility,在您使用的双版之间:

  • You are using chromedriver=78.0.3904.105
  • You are using chrome=78.0.3904.108
  • Your Selenium Client version is 2.45.0 of 2015-02-27 09:10:26 which is ancient and almost 5 years older.
  • Your JDK version is 1.8.0_101 which is pretty ancient.

因此,JDK v8u101,Seleniumuser v2.45.0,Chromeardr v78.0/em>和之间有明显的不匹配。 Chrome Browser v78.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.
  • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test as non-root user.




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...