edgedriver crashes when started in remote mode

%3CLINGO-SUB%20id%3D%22lingo-sub-2682442%22%20slang%3D%22en-US%22%3Eedgedriver%20crashes%20when%20started%20in%20remote%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2682442%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EStarting%20from%20edgedriver%20win32%20version%2092.0.879.0%2C%20we%20get%20a%20crash%20of%20the%20edgedriver%20when%20doing%20so%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1%2F%20start%20an%20edgedriver.exe%20on%20a%20specific%20port%2C%20accepting%20all%20clients%2C%20on%20host1%20(host1%20is%20win%20server%202019%20v1809)%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3Ecmd%26gt%3BC%3A%5Cedgedriver%5Cedgedriver.exe%20--port%3D7000%20--whitelisted-ips%3D%22%22%0AStarting%20MSEdgeDriver%2094.0.994.0%20(fe97930076c686ffe5b79f8c2ed55ce99113c39e)%20on%20port%207000%0AAll%20remote%20connections%20are%20allowed.%20Use%20an%20allowlist%20instead!%0APlease%20see%20https%3A%2F%2Fchromedriver.chromium.org%2Fsecurity-considerations%20for%20suggestions%20on%20keeping%20MSEdgeDriver%20safe.%0AMSEdgeDriver%20was%20started%20successfully.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2%2F%20Access%20the%20driver%20url%2C%20from%20host1%2C%20using%20a%20browser%20and%20%22localhost%22%20loopback%20address%20%3A%3CBR%20%2F%3E%3CA%20href%3D%22http%3A%2F%2Flocalhost%3A7000%2Fsessions%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Flocalhost%3A7000%2Fsessions%20%3C%2FA%3E%3C%2FP%3E%3CP%3E%3D%26gt%3B%20OK%2C%20we%20get%20the%20json%20response%20in%20the%20browser%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%22sessionId%22%3A%22%22%2C%22status%22%3A0%2C%22value%22%3A%5B%5D%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E3%2F%20Accessing%20the%20driver%20url%2C%20from%20host1%20(or%20another%20host)%20using%20the%20hostname%20%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3Ehttp%3A%2F%2Fhost1%3A7000%2Fsessions%20in%20browser%0Aor%0Awget%20http%3A%2F%2Fhost1%3A7000%2Fsessions%20in%20CLI%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3D%26gt%3B%20makes%20the%20edgedriver%20that%20was%20started%20in%20step%201%2F%20crash.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EStep%203%2F%20used%20to%20work%20(edgedriver.exe%20would%20stay%20up%2C%20and%20json%20response%20displayed%20in%20browser)%20until%20version%2092.0.878.0%20(included)%20of%20edgedriver.exe%2C%20and%20started%20failing%20starting%20from%20version%2092.0.879.0.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20used%20to%20start%20a%20remote%20edge%20browser%20(until%2092.0.878.0)%20in%20java%20with%20the%20following%20code%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3ECapabilities%20caps%3B%0AEdgeOptions%20options%20%3D%20new%20EdgeOptions()%3B%0Aoptions.setCapability(%22UseChromium%22%2C%20true)%3B%0Acaps%20%3D%20options%3B%0Adriver%20%3D%20new%20RemoteWebDriver(new%20URL(url)%2C%20caps)%3B%20%2F%2Furl%20would%20be%20http%3A%2F%2Fhost1%3A7000%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20code%20now%20leads%20to%20the%20following%20exception%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%3Eorg.openqa.selenium.remote.UnreachableBrowserException%3A%20Could%20not%20start%20a%20new%20session.%20Possible%20causes%20are%20invalid%20address%20of%20the%20remote%20server%20or%20browser%20start-up%20failure.%0ABuild%20info%3A%20version%3A%20'3.9.1'%2C%20revision%3A%20'63f7b50'%2C%20time%3A%20'2018-02-07T22%3A42%3A22.379Z'%0ASystem%20info%3A%20host%3A%20'...'%2C%20ip%3A%20'...'%2C%20os.name%3A%20'Windows%2010'%2C%20os.arch%3A%20'amd64'%2C%20os.version%3A%20'10.0'%2C%20java.version%3A%20'1.8.0_281'%0ADriver%20info%3A%20driver.version%3A%20RemoteWebDriver%0Aat%20org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java%3A622)%0Aat%20org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java%3A219)%0Aat%20org.openqa.selenium.remote.RemoteWebDriver.%3CINIT%3E(RemoteWebDriver.java%3A142)%0Aat%20org.openqa.selenium.remote.RemoteWebDriver.%3CINIT%3E(RemoteWebDriver.java%3A155)%0A%5B...%5D%0ACaused%20by%3A%20java.net.SocketException%3A%20Connection%20reset%0Aat%20java.net.SocketInputStream.read(SocketInputStream.java%3A210)%0Aat%20java.net.SocketInputStream.read(SocketInputStream.java%3A141)%0Aat%20okio.Okio%242.read(Okio.java%3A139)%0Aat%20okio.AsyncTimeout%242.read(AsyncTimeout.java%3A237)%0Aat%20okio.RealBufferedSource.indexOf(RealBufferedSource.java%3A345)%0Aat%20okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java%3A217)%0Aat%20okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java%3A212)%0Aat%20okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java%3A189)%0Aat%20okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java%3A88)%0Aat%20okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java%3A147)%0Aat%20okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java%3A45)%0Aat%20okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java%3A147)%0Aat%20okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java%3A121)%0Aat%20okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java%3A93)%0Aat%20okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java%3A147)%0Aat%20okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java%3A121)%0Aat%20okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java%3A93)%0Aat%20okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java%3A147)%0Aat%20okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java%3A125)%0Aat%20okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java%3A147)%0Aat%20okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java%3A121)%0Aat%20okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java%3A200)%0Aat%20okhttp3.RealCall.execute(RealCall.java%3A77)%0Aat%20org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java%3A104)%0Aat%20org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java%3A54)%0Aat%20org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java%3A101)%0Aat%20org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java%3A73)%0Aat%20org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java%3A138)%0Aat%20org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java%3A601)%0A...%2033%20more%3C%2FINIT%3E%3C%2FINIT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EG.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2683351%22%20slang%3D%22en-US%22%3ERe%3A%20edgedriver%20crashes%20when%20started%20in%20remote%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2683351%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1136353%22%20target%3D%22_blank%22%3E%40gtllbx%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Emore%20info%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ein%20step%203%2F%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fhost1%3A7000%2Fsessions%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fhost1%3A7000%2Fsessions%3C%2FA%3E%20%3D%26gt%3B%20fails%20(edgedriver%20is%20shutdown%2Fcrashes)%3CBR%20%2F%3E%3CA%20href%3D%22http%3A%2F%2F12.34.149.167%3A7000%2Fsessions%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2F12.34.149.167%3A7000%2Fsessions%3C%2FA%3E%20%3D%26gt%3B%20succeeds%20(json%20displayed%20in%20browser%20and%20edgedriver%20stays%20up)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20the%20driver%20crashes%20when%20it%20is%20targetted%20with%20server%20hostname%2C%20but%20responds%20correctly%20when%20it%20is%20targetted%20with%20server%20ip.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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.

1 Reply

@gtllbx 

 

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.