SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.48k stars 8.15k forks source link

[🐛 Bug]: IEDriverServer stuck when remote node windows session locked #10794

Closed zefkide closed 2 years ago

zefkide commented 2 years ago

What happened?

Hello,

As we are upgrading grid 2 to grid 4 I am facing the following issue: running a basic test on a remote (node) windows machine hangs IE on the initial page with the following error : "This is the initial start page for the WebDriver server" in case that remote session is disconnected. It is not the case for chrome, firefox or edge that run without any issue. IE also works fine if I stay connected on the remote desktop session of that node. Versions and configurations:

The issue is also present when I try to run Edge in IE mode. I guess it is related to IEDriverServer.

I saw that this issue is reported in 2020 on google groups but nobody answered it. The link is here https://groups.google.com/g/selenium-users/c/G_6nrNrTc5Y/m/vGm8WZkzAAAJ

Thank you in advance, Marius

How can we reproduce the issue?

1. open a remote (rdc) session and run this command in cmd (as regular user or administrator) to start the node on windows 2016 or 2019:
c:\> java -jar selenium-server-4.2.1.jar standalone
Disconnect your remote session (X)

run the following code from a remote machine :
    InternetExplorerOptions options = new InternetExplorerOptions();
    WebDriver driver = new RemoteWebDriver(new URL("http://1.2.3.4:4444), options);
    driver.get("https://www.google.com");
    driver.quit();

After few moments connect again your remote session. You will see IE hanged with the following message "This is the initial start page for the WebDriver server"

If you repeat the test by keeping the remote session connected you will be able to see your test completed.

Relevant log output

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '4.2.1', revision: 'ac4d0fdd4a'
System info: host: 'SELEN1', ip: '1.2.3.4', os.name: 'Windows Server 2012 R2', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_51'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: internet explorer, pageLoadStrategy: normal, se:ieOptions: {ignoreProtectedModeSettings: true, ignoreZoomSetting: true}}], desiredCapabilities=Capabilities {browserName: internet explorer, ignoreProtectedModeSettings: true, ignoreZoomSetting: true, pageLoadStrategy: normal, se:ieOptions: {ignoreProtectedModeSettings: true, ignoreZoomSetting: true}}}]
Capabilities {}
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:569)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:246)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:162)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
    at ulis14.Main.main(Main.java:143)
Caused by: java.lang.RuntimeException: NettyHttpHandler request execution error
    at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:76)
    at org.openqa.selenium.remote.http.netty.NettyHttpHandler$$Lambda$91/5974363.execute(Unknown Source)
    at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
    at org.openqa.selenium.remote.http.AddSeleniumUserAgent$$Lambda$306/10272124.execute(Unknown Source)
    at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56)
    at org.openqa.selenium.remote.http.Filter$$Lambda$92/6757759.execute(Unknown Source)
    at org.openqa.selenium.remote.http.netty.NettyHttpHandler.execute(NettyHttpHandler.java:49)
    at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
    at org.openqa.selenium.remote.http.AddSeleniumUserAgent$$Lambda$306/10272124.execute(Unknown Source)
    at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56)
    at org.openqa.selenium.remote.http.Filter$$Lambda$92/6757759.execute(Unknown Source)
    at org.openqa.selenium.remote.http.netty.NettyClient.execute(NettyClient.java:98)
    at org.openqa.selenium.remote.tracing.TracedHttpClient.execute(TracedHttpClient.java:55)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:120)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:102)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:156)
    at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:51)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:551)
    ... 4 more
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timeout to 1.2.3.4/1.2.3.4:4444 after 180000 ms
    at java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
    at java.util.concurrent.CompletableFuture.get(Unknown Source)
    at org.asynchttpclient.netty.NettyResponseFuture.get(NettyResponseFuture.java:206)
    at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:59)
    ... 22 more
Caused by: java.util.concurrent.TimeoutException: Request timeout to 1.2.3.4/1.2.3.4:4444 after 180000 ms
    at org.asynchttpclient.netty.timeout.TimeoutTimerTask.expire(TimeoutTimerTask.java:43)
    at org.asynchttpclient.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:50)
    at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715)
    at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)
    at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703)
    at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790)
    at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Unknown Source)

Operating System

Windows Server 2016/2019

Selenium version

4.2.1

What are the browser(s) and version(s) where you see this issue?

Internet Explorer 1809 build 17763.2803

What are the browser driver(s) and version(s) where you see this issue?

IEDriverServer 4.2.0.0

Are you using Selenium Grid?

4.2.1

github-actions[bot] commented 2 years ago

@zefkide, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

diemol commented 2 years ago

This is a duplicate of #10162, which was reported to the Edge team https://github.com/MicrosoftEdge/EdgeWebDriver/issues/15

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.