seleniumhq-community / docker-seleniarm

Multi-Arch (arm64/armhf/amd64) Docker images for the Selenium Grid Server
https://hub.docker.com/u/seleniarm
Other
249 stars 26 forks source link

[🐛 Bug]: VNC remote view not working #32

Closed goal1860 closed 1 year ago

goal1860 commented 1 year ago

What happened?

I am running the image and some test a the same time. The test finished successfully but I can't see anything from VNC client.

image

Command used to start Selenium Grid with Docker

docker run --rm -it -p 4444:4444 -p 5900:5900 -p 7900:7900 --shm-size 2g seleniarm/standalone-chromium:4.8.1-20230310
Tested latest as well.
The most suspicious error is:
[1678662624.502][SEVERE]: bind() failed: Cannot assign requested address (99)

Relevant log output

Status: Downloaded newer image for seleniarm/standalone-chromium:4.8.1-20230310
2023-03-12 23:07:52,017 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2023-03-12 23:07:52,029 INFO RPC interface 'supervisor' initialized
2023-03-12 23:07:52,029 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-03-12 23:07:52,030 INFO supervisord started with pid 8
2023-03-12 23:07:53,032 INFO spawned: 'xvfb' with pid 9
2023-03-12 23:07:53,035 INFO spawned: 'vnc' with pid 10
2023-03-12 23:07:53,038 INFO spawned: 'novnc' with pid 11
2023-03-12 23:07:53,040 INFO spawned: 'selenium-standalone' with pid 13
Setting up SE_NODE_GRID_URL...
2023-03-12 23:07:53,052 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-03-12 23:07:53,052 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-03-12 23:07:53,052 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-03-12 23:07:53,052 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
find: '/home/seluser/.config/chromium/Crash Reports/pending/': No such file or directory
Selenium Grid Standalone configuration:
[network]
relax-checks = true

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

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

Starting Selenium Grid Standalone...
Tracing is disabled
23:07:53.646 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
23:07:53.652 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
23:07:54.194 INFO [NodeOptions.getSessionFactories] - Detected 5 available processors
23:07:54.220 INFO [NodeOptions.report] - Adding chrome for {"browserVersion": "111.0","se:noVncPort": 7900,"browserName": "chrome","platformName": "LINUX","se:vncEnabled": true} 1 times
23:07:54.228 INFO [Node.<init>] - Binding additional locator mechanisms: relative
23:07:54.239 INFO [GridModel.setAvailability] - Switching Node 5d8e20cc-bdef-4386-919e-1607de589d65 (uri: http://172.17.0.2:4444) from DOWN to UP
23:07:54.239 INFO [LocalDistributor.add] - Added node 5d8e20cc-bdef-4386-919e-1607de589d65 at http://172.17.0.2:4444. Health check every 120s
23:07:54.327 INFO [Standalone.execute] - Started Selenium Standalone 4.8.1 (revision 8ebccac989): http://172.17.0.2:4444
23:08:45.863 INFO [LocalDistributor.newSession] - Session request received by the Distributor:
 [Capabilities {browserName: chrome, goog:chromeOptions: {args: [--disable-infobars, --disable-notifications, --window-size=1920,1080, --ignore-certificate-errors, --headless]}}]
Starting ChromeDriver 111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}) on port 13817
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1678662525.90C4h]r[oSmEeVDErRiEv]e:r  bwiansd (s)t afratielde ds:u cCcaensnsoftu lalsys.i
gn requested address (99)
23:08:46.403 INFO [LocalNode.newSession] - Session created by the Node. Id: 2d1b1493bdba93b4e85a79fa6aa35a3b, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 111.0.5563.64, chrome: {chromedriverVersion: 111.0.5563.64 (c710e93d5b63..., userDataDir: /tmp/.org.chromium.Chromium...}, goog:chromeOptions: {debuggerAddress: localhost:42265}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:cdp: http://localhost:42265, se:cdpVersion: 111.0.5563.64, se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.2: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:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
23:08:46.406 INFO [LocalDistributor.newSession] - Session created by the Distributor. Id: 2d1b1493bdba93b4e85a79fa6aa35a3b
 Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 111.0.5563.64, chrome: {chromedriverVersion: 111.0.5563.64 (c710e93d5b63..., userDataDir: /tmp/.org.chromium.Chromium...}, goog:chromeOptions: {debuggerAddress: localhost:42265}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://172.17.0.2:4444/sessio..., se:cdpVersion: 111.0.5563.64, se:vnc: ws://172.17.0.2:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.2: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:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
23:09:25.075 INFO [LocalSessionMap.lambda$new$0] - Deleted session from local Session Map, Id: 2d1b1493bdba93b4e85a79fa6aa35a3b
23:09:25.076 INFO [GridModel.release] - Releasing slot for session id 2d1b1493bdba93b4e85a79fa6aa35a3b
23:09:25.076 INFO [SessionSlot.stop] - Stopping session 2d1b1493bdba93b4e85a79fa6aa35a3b
23:10:24.490 INFO [LocalDistributor.newSession] - Session request received by the Distributor:
 [Capabilities {browserName: chrome, goog:chromeOptions: {args: [--disable-infobars, --disable-notifications, --window-size=1920,1080, --ignore-certificate-errors, --headless]}}]
Starting ChromeDriver 111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}) on port 30261
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1678662624.502][SEVERE]: bind() failed: Cannot assign requested address (99)
23:10:24.785 INFO [LocalNode.newSession] - Session created by the Node. Id: 3a088b7e562ff1e961bfde6886efc0c1, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 111.0.5563.64, chrome: {chromedriverVersion: 111.0.5563.64 (c710e93d5b63..., userDataDir: /tmp/.org.chromium.Chromium...}, goog:chromeOptions: {debuggerAddress: localhost:34333}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:cdp: http://localhost:34333, se:cdpVersion: 111.0.5563.64, se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.2: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:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
23:10:24.786 INFO [LocalDistributor.newSession] - Session created by the Distributor. Id: 3a088b7e562ff1e961bfde6886efc0c1
 Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 111.0.5563.64, chrome: {chromedriverVersion: 111.0.5563.64 (c710e93d5b63..., userDataDir: /tmp/.org.chromium.Chromium...}, goog:chromeOptions: {debuggerAddress: localhost:34333}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://172.17.0.2:4444/sessio..., se:cdpVersion: 111.0.5563.64, se:vnc: ws://172.17.0.2:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.17.0.2: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:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
23:11:25.838 INFO [LocalSessionMap.lambda$new$0] - Deleted session from local Session Map, Id: 3a088b7e562ff1e961bfde6886efc0c1
23:11:25.839 INFO [GridModel.release] - Releasing slot for session id 3a088b7e562ff1e961bfde6886efc0c1
23:11:25.839 INFO [SessionSlot.stop] - Stopping session 3a088b7e562ff1e961bfde6886efc0c1

Operating System

MacOS Ventura 13.2.1

Docker Selenium version (tag)

4.8.1-20230310

diemol commented 1 year ago

This happens because you are using the --headless flag.

 [Capabilities {browserName: chrome, goog:chromeOptions: {args: [--disable-infobars, --disable-notifications, --window-size=1920,1080, --ignore-certificate-errors, --headless]}}]

Please remove it and you will see the browser.

goal1860 commented 1 year ago

@diemol thanks a lot. Didn't realise this settings in the config file.

github-actions[bot] commented 7 months 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.