Webdriver hangs when opening/closing browser

194 views
Skip to first unread message

Andrei Solntsev

unread,
Aug 4, 2015, 6:45:20 PM8/4/15
to seleniu...@googlegroups.com
Hi all!
We experience problem with Chrome driver.
It just hangs when trying to open browser.
One threads stays in the same state endlessly (see thread dump below).

The problem is caused by command "webdriver.navigate().to(url)".
"Forwarding get on session 747e3fff94b8f680fae3e2828a2aa30a to remote" 
   java.lang.Thread.State: RUNNABLE
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
        at java.net.SocketInputStream.read(SocketInputStream.java:170)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
        at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
        at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
        at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
        at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
        at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
        at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
        at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
        at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
        at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:143)
        at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:89)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:134)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:67)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:568)
        at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:306)
        at org.openqa.selenium.remote.RemoteWebDriver$RemoteNavigation.to(RemoteWebDriver.java:850)
        at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringNavigation.to(EventFiringWebDriver.java:470)
        at com.codeborne.selenide.impl.Navigator.navigateToAbsoluteUrl(Navigator.java:43)
        at com.codeborne.selenide.impl.Navigator.open(Navigator.java:23)
        at com.codeborne.selenide.Selenide.open(Selenide.java:53)


Andrei Solntsev

Krishnan Mahadevan

unread,
Aug 4, 2015, 8:58:29 PM8/4/15
to Selenium Users
How about adding the below information as well ?

  • OS Flavor and version ?
  • Selenium version ?
  • Chrome version ?
  • Chrome driver version ?
  • How does your sample code look like ? From the stack trace I notice you may be using http://selenide.org/index.html. Does this happen when you use raw WebDriver code as well ?




Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAE7WSaFkq4hcM3Pq7weAiYcc8cAA3xRc92MgLN8-s88igvaAyw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

mr. Selenide

unread,
Aug 7, 2015, 6:33:38 AM8/7/15
to Selenium Users
I guess it's not really important, but here are details:

  • OS Flavor and version - Ubuntu linux 14.x,
  • Selenium version - at least these versions: 2.44, 2.45, 2.46, 2.47, 2.47.1
  • Chrome version - all versions during last year, currently 44.0.2
  • Chrome driver version - at least 2.15 and 2.16
  • How does your sample code look like ? From the stack trace I notice you may be using http://selenide.org/index.html. Does this happen when you use raw WebDriver code as well ?
    Yes, we use Selenide, but the code looks like this:

    DesiredCapabilities browserCapabilities = new DesiredCapabilities();
    ChromeOptions options = new ChromeOptions();
    options.addArguments("test-type");
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    WebDriver webdriver = new ChromeDriver(capabilities);
    webdriver.navigate().to(url);   // hangs

    среда, 5 августа 2015 г., 1:45:20 UTC+3 пользователь mr. Selenide написал:

    Krishnan Mahadevan

    unread,
    Aug 7, 2015, 8:13:18 AM8/7/15
    to Selenium Users
    Andrei,

    I dont have a Ubuntu Linux at my disposal. The code works fine on my MAC though.

    Here's the output of the same. The URL that I was launching was facebook.com 
    Starting ChromeDriver 2.15.322455 (ae8db840dac8d0c453355d3d922c91adfb61df8f) on port 35051
    Only local connections are allowed.
    Title Facebook - Log In or Sign Up


    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/
    My Technical Scribbings @ http://rationaleemotions.wordpress.com/

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
    To post to this group, send email to seleniu...@googlegroups.com.

    mr. Selenide

    unread,
    Aug 7, 2015, 3:20:11 PM8/7/15
    to Selenium Users
    Yes, I don't get the error every time. Most of the times chromedriver works well, but time to time it hangs.
    Reply all
    Reply to author
    Forward
    0 new messages