Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: selenium grid [4.2.1-20220531]: edge node - DevToolsActivePort file doesn't exist #1596

Closed
RayChenLDL opened this issue Jun 2, 2022 · 5 comments

Comments

@RayChenLDL
Copy link

What happened?

I am using ruby 2.7.3 and watir 7.1.0, trying to run the ui test on the selenium grid 4 ([4.2.1-20220531]);

I started the selenium grid 4 with all the docker containers, including selenium hub and chrome & edge nodes. they are setup very well;

with my ruby, I am trying to open a new browser:
$browser = Watir::Browser.new :edge, :url => "http://localhost:4444/wd/hub", options: {args: "--disable-dev-shm-usage"}

then got the error:
image

How can we reproduce the issue?

Run the commands below to spin up selenium grid 4:
docker network create nut

docker run -d -p 4442-4444:4442-4444 --network nut --name selenium-hub selenium/hub:4.2.1-20220531 

docker run -d -p 5902:5900 --network nut --name selenium-edge -e SE_EVENT_BUS_HOST=selenium-hub -e SE_EVENT_BUS_PUBLISH_PORT=4442 -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 selenium/node-edge:4.2.1-20220531

then with ruby:
$browser = Watir::Browser.new :edge, :url => "http://localhost:4444/wd/hub", options: {args: "--disable-dev-shm-usage"}

Relevant log output

Could not start a new session. Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: unknown error: MSEdge failed to start: crashed.
        (unknown error: DevToolsActivePort file doesn't exist)
        (The process started from msedge location /usr/bin/microsoft-edge is no longer running, so MSEdgeDriver is assuming that MSEdge has crashed.)
      Build info: version: '4.2.1', revision: 'ac4d0fdd4a'
      System info: host: '9fb7575656c3', ip: '172.20.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.16.3-microsoft-standard-WSL2', java.version: '11.0.15'
      Driver info: driver.version: unknown
      Build info: version: '4.2.1', revision: 'ac4d0fdd4a'
      System info: host: '9fb7575656c3', ip: '172.20.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.16.3-microsoft-standard-WSL2', java.version: '11.0.15'
      Driver info: driver.version: unknown
      Build info: version: '4.2.1', revision: 'ac4d0fdd4a'
      System info: host: '7c1bafbe4108', ip: '172.20.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.16.3-microsoft-standard-WSL2', java.version: '11.0.15'
      Driver info: driver.version: unknown (Selenium::WebDriver::Error::SessionNotCreatedError)
      [remote server] org.openqa.selenium.grid.node.remote.RemoteNode(RemoteNode.java):150:in `newSession'
      [remote server] org.openqa.selenium.grid.distributor.local.LocalDistributor(LocalDistributor.java):618:in `startSession'
      [remote server] org.openqa.selenium.grid.distributor.local.LocalDistributor(LocalDistributor.java):544:in `newSession'
      [remote server] org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable(LocalDistributor.java):791:in `handleNewSessionRequest'
      [remote server] org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable(LocalDistributor.java):752:in `lambda$run$1'
      [remote server] java.util.concurrent.ThreadPoolExecutor(ThreadPoolExecutor.java):1128:in `runWorker'
      [remote server] java.util.concurrent.ThreadPoolExecutor$Worker(ThreadPoolExecutor.java):628:in `run'
      [remote server] java.lang.Thread(Thread.java):829:in `run'

Operating System

Windows10

Selenium version

ruby 2.7.5

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

edge 101.0.1210.53

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

edge 101.0.1210.53

Are you using Selenium Grid?

4.2.1-20220531

@github-actions
Copy link

github-actions bot commented Jun 2, 2022

@RayChenLDL, 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
Copy link
Member

diemol commented Jun 2, 2022

Can you please add the --shm-size="2g" when starting the Node and report back again?

@RayChenLDL
Copy link
Author

Just tried, the same error

@diemol diemol transferred this issue from SeleniumHQ/selenium Jun 8, 2022
@diemol
Copy link
Member

diemol commented Jun 14, 2022

I am not able to reproduce this.

How I started the Grid in Windows 11 with PowerShell (using the most recent version):

$ docker network create grid
$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.2.2-20220609
$ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub `
    --shm-size="2g" `
    -e SE_EVENT_BUS_PUBLISH_PORT=4442 `
    -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 `
    selenium/node-edge:4.2.2-20220609

And using this test, I get the following logs:

Node log:

2022-06-14 09:29:52,526 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2022-06-14 09:29:52,527 INFO supervisord started with pid 8
2022-06-14 09:29:53,530 INFO spawned: 'xvfb' with pid 10
2022-06-14 09:29:53,532 INFO spawned: 'vnc' with pid 11
2022-06-14 09:29:53,533 INFO spawned: 'novnc' with pid 12
2022-06-14 09:29:53,535 INFO spawned: 'selenium-node' with pid 13
2022-06-14 09:29:53,544 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-06-14 09:29:53,544 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-06-14 09:29:53,544 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-06-14 09:29:53,544 INFO success: selenium-node entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Generating Selenium Config
Configuring server...
Setting up SE_NODE_HOST...
Setting up SE_NODE_PORT...
Setting up SE_NODE_GRID_URL...
Selenium Grid Node configuration: 
[events]
publish = "tcp://selenium-hub:4442"
subscribe = "tcp://selenium-hub:4443"

[node]
session-timeout = "300"
override-max-sessions = false
detect-drivers = false
drain-after-session-count = 0
max-sessions = 1

[[node.driver-configuration]]
display-name = "MicrosoftEdge"
stereotype = '{"browserName": "MicrosoftEdge", "browserVersion": "102.0", "platformName": "Linux"}'
max-sessions = 1

Starting Selenium Grid Node...
09:29:54.164 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
09:29:54.167 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
09:29:54.245 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://selenium-hub:4442 and tcp://selenium-hub:4443
09:29:54.281 INFO [UnboundZmqEventBus.<init>] - Sockets created
09:29:55.283 INFO [UnboundZmqEventBus.<init>] - Event bus ready
09:29:55.380 INFO [NodeServer.createHandlers] - Reporting self as: http://172.19.0.3:5555
09:29:55.392 INFO [NodeOptions.getSessionFactories] - Detected 12 available processors
09:29:55.420 INFO [NodeOptions.report] - Adding MicrosoftEdge for {"browserVersion": "102.0","se:noVncPort": 7900,"browserName": "MicrosoftEdge","platformName": "LINUX","se:vncEnabled": true} 1 times
09:29:55.429 INFO [Node.<init>] - Binding additional locator mechanisms: name, id, relative
09:29:55.550 INFO [NodeServer$1.start] - Starting registration process for Node http://172.19.0.3:5555
09:29:55.551 INFO [NodeServer.execute] - Started Selenium node 4.2.2 (revision 683ccb65d6): http://172.19.0.3:5555
09:29:55.559 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
09:29:55.850 INFO [NodeServer.lambda$createHandlers$2] - Node has been added
Starting Microsoft Edge WebDriver 102.0.1245.33 (41285f1c5672f618820f679d5efba8bafa4828de) on port 36910
To submit feedback, report a bug, or suggest new features, please visit https://github.com/MicrosoftEdge/EdgeWebDriver

Only local connections are allowed.
Please see https://aka.ms/WebDriverSecurity for suggestions on keeping Microsoft Edge WebDriver safe.

M[ic1r6o5s5o1f9t9 118.603][SEVERE]: bind() failed: Cannot assign requested address (99)
Edge WebDriver was started successfully.
09:31:59.240 INFO [ProtocolHandshake.createSession] - Detected upstream dialect: W3C
09:31:59.253 INFO [LocalNode.newSession] - Session created by the Node. Id: cc957e5628208c48e73705c4bc23b161, Caps: Capabilities {acceptInsecureCerts: false, browserName: msedge, browserVersion: 102.0.1245.33, ms:edgeOptions: {debuggerAddress: localhost:46057}, msedge: {msedgedriverVersion: 102.0.1245.33 (41285f1c5672..., userDataDir: /tmp/.com.microsoft.Edge.Wx...}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:cdp: http://localhost:46057, se:cdpVersion: 102.0.1245.33, se:vncEnabled: true, se:vncLocalAddress: ws://172.19.0.3:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
09:32:00.551 INFO [SessionSlot.stop] - Stopping session cc957e5628208c48e73705c4bc23b161

Can you try the same on your environment?

@RayChenLDL
Copy link
Author

Thanks, It works when I tried. Please close the ticket.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants