-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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]: WebSocket Path Not Working with Selenium Grid --sub-path Option #13393
Comments
@hil00137, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Does it work if you do not use Docker? |
@VietND96 do you know? I believe this was fixed. |
@diemol
Screenshots showing the sub-path added to the manager launched via command line. |
Looks like my fix only works when there is ingress configured upfront - as the comment and reproduce #12791 (comment) |
@VietND96 docker run -p 5555:5555 -e SE_EVENT_BUS_HOST=<hub-ip> \
-e SE_EVENT_BUS_PUBLISH_PORT=4442 \
-e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \
-e SE_VNC_NO_PASSWORD=1 \
-e SE_VNC_VIEW_ONLY=1 \
-e SE_NODE_GRID_URL=http://<hub-ip>:4444/selenium \
-v ${PWD}/selenium-http-jdk-client.jar:/opt/selenium/selenium-http-jdk-client.jar \
-v ${PWD}/config.toml:/opt/bin/config.toml \
-v /var/run/docker.sock:/var/run/docker.sock \
selenium/node-docker:4.16.1 The contents of config.toml are as follows: [docker]
configs = [
"selenium/standalone-chrome:120.0", '{"browserName": "chrome", "browserVersion": "120.0"}',
....
]
[server]
host = "<node-ip>"
port = 5555 In this setup, when attempting a VNC connection from the manager, it tries to connect to the URL with /selenium appended. However, the actual successful connection can only be established to the URL without /selenium. manager request like this. but failed connect I tried without /selenium, success connect I am currently testing to set up a Selenium Grid using Docker nodes as shown above. |
I suspect something around here
@joerg1985, do you have any idea on this? do we need to add Route.prefix in case subPath present in Router config? |
Not sure it is there, maybe it is around |
Hi @hil00137, if you have time, can you do a test with my image containing the fix from namespace |
@VietND96 docker run -p 5555:5555 -e SE_EVENT_BUS_HOST=<hub-ip> \
-e SE_EVENT_BUS_PUBLISH_PORT=4442 \
-e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \
-e SE_VNC_NO_PASSWORD=1 \
-e SE_VNC_VIEW_ONLY=1 \
-e SE_NODE_GRID_URL=http://<hub-ip>:4444/selenium \
-v ${PWD}/selenium-http-jdk-client.jar:/opt/selenium/selenium-http-jdk-client.jar \
-v ${PWD}/config.toml:/opt/bin/config.toml \
-v /var/run/docker.sock:/var/run/docker.sock \
ndviet/node-docker:latest Configuration for config.toml: [docker]
configs = [
"ndviet/standalone-chrome:latest", '{"browserName": "chrome"}',
....
]
[server]
host = "<node-ip>"
port = 5555 I also ran the selenium-hub using the Docker image you mentioned. While the WebSocket connection is successful, it seems to close immediately if the Duration is less than 10 seconds. It's not exact, but it appears that only after exceeding about 10 seconds, the connection remains properly open without closing, allowing me to view the screen. ![]() ![]() The two images were run at different times, so the session IDs are different, but the same issue occurs every time they are executed. For testing purposes, I used RemoteWebDriver to execute the code and then added a long Thread.sleep in the next line for testing. |
@hil00137, thank you. There is an error message that I could not see in my local while testing |
@hil00137 you never mentioned you are using the |
@VietND96 |
@diemol [docker]
configs = [
"selenium/standalone-chrome:120.0", '{"browserName": "chrome", "browserVersion": "120.0"}',
"selenium/standalone-edge:120.0", '{"browserName": "MicrosoftEdge", "browserVersion": "120.0"}'
]
[server]
host = "<node-ip>"
port = 5555 |
Fixed by #13407 |
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. |
What happened?
Description:
After setting up Selenium Grid with the
--sub-path=/selenium-grid
option, I encountered an issue with the WebSocket path. Previously, I was able to access the WebSocket using the pathws://ip:port/sessions/{ID}/se/vnc
. However, after adding the--sub-path
option, the expected WebSocket pathws://ip:port/selenium-grid/sessions/{ID}/se/vnc
does not work.Steps to Reproduce:
--sub-path=/selenium-grid
option.ws://ip:port/selenium-grid/sessions/{ID}/se/vnc
.Expected Behavior:
The WebSocket should be accessible at the path
ws://ip:port/selenium-grid/sessions/{ID}/se/vnc
, reflecting the--sub-path
configuration.Actual Behavior:
The WebSocket path
ws://ip:port/selenium-grid/sessions/{ID}/se/vnc
is not functional, and there seems to be no alternative path that accommodates the--sub-path
configuration.Additional Information:
--sub-path
option in Selenium Grid.If there is no sub-path option available, could you please inform me of any other methods to set a sub-path specifically for WebSocket connections? I would greatly appreciate your guidance on this.
Thank you for your assistance in resolving this matter.
How can we reproduce the issue?
Relevant log output
Operating System
WSL2 with selenium docker
Selenium version
Java 4.16.1
What are the browser(s) and version(s) where you see this issue?
Chrome 119
What are the browser driver(s) and version(s) where you see this issue?
Not Important
Are you using Selenium Grid?
4.16.1
The text was updated successfully, but these errors were encountered: