question

Gtllbx-1672 avatar image
0 Votes"
Gtllbx-1672 asked XuDongPeng-MSFT answered

edgedriver crashes in remote mode, bug?

Hello,



Starting from edgedriver win32 version 92.0.879.0, we get a crash of the edgedriver when doing so :


1/ start an edgedriver.exe on a specific port, accepting all clients, on host1 (host1 is win server 2019 v1809):

cmd>C:\edgedriver\edgedriver.exe --port=7000 --whitelisted-ips=""
Starting MSEdgeDriver 94.0.994.0 (fe97930076c686ffe5b79f8c2ed55ce99113c39e) on port 7000
All remote connections are allowed. Use an allowlist instead!
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe.
MSEdgeDriver was started successfully.

2/ Access the driver url, from host1, using a browser and "localhost" loopback address :

http://localhost:7000/sessions

=> OK, we get the json response in the browser

{"sessionId":"","status":0,"value":[]}


3/ Accessing the driver url, from host1 (or another host) using the hostname :

http://host1:7000/sessions in browser

or

wget http://host1:7000/sessions in CLI

=> makes the edgedriver that was started in step 1/ crash.


Step 3/ used to work (edgedriver.exe would stay up, and json response displayed in browser) until version 92.0.878.0 (included) of edgedriver.exe, and started failing starting from version 92.0.879.0.

We used to start a remote edge browser (until 92.0.878.0) in java with the following code :

Capabilities caps;
EdgeOptions options = new EdgeOptions();
options.setCapability("UseChromium", true);
caps = options;
driver = new RemoteWebDriver(new URL(url), caps); //url would be http://host1:7000

This code now leads to the following exception :


  org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
     Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:42:22.379Z'
     System info: host: '...', ip: '...', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_281'
     Driver info: driver.version: RemoteWebDriver
     at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:622)
     at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
     at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
     at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:155)
     [...]
     Caused by: java.net.SocketException: Connection reset
     at java.net.SocketInputStream.read(SocketInputStream.java:210)
     at java.net.SocketInputStream.read(SocketInputStream.java:141)
     at okio.Okio$2.read(Okio.java:139)
     at okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
     at okio.RealBufferedSource.indexOf(RealBufferedSource.java:345)
     at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:217)
     at okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java:212)
     at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
     at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
     at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
     at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
     at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
     at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
     at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
     at okhttp3.RealCall.execute(RealCall.java:77)
     at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:104)
     at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:54)
     at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:101)
     at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
     at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138)
     at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
     ... 33 more


Regards,


G.










ms-edge
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XuDongPeng-MSFT avatar image
1 Vote"
XuDongPeng-MSFT answered

Hi @Gtllbx-1672 ,

According to your description, I successfully reproduced your issue. It does work correctly in the version 92.0.878.0 win32, and the problem you mentioned does occur in the version 92.0.879.0 win32.

I will report this issue to the relevant team as soon as possible, hoping that this can be fixed in time. You can also send feedback to the relevant team. Just press Alt+Shift+I in the Edge browser, then edit your issue and send it.

Best regards,
Xudong Peng


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Gtllbx-1672 avatar image
0 Votes"
Gtllbx-1672 answered Gtllbx-1672 edited

more info :

in step 3/

http://host1:7000/sessions => fails (edgedriver is shutdown/crashes)
http://12.34.149.167:7000/sessions => succeeds (json displayed in browser and edgedriver stays up)

So the driver crashes when it is targetted with server hostname, but responds correctly when it is targetted with server ip.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.