aerokube / selenoid

Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.
https://aerokube.com/selenoid/latest/
Apache License 2.0
2.59k stars 323 forks source link

Issue when using latest tag for firefox and generally with firefox #1440

Open nikolalecic-humanity opened 4 days ago

nikolalecic-humanity commented 4 days ago

Hello,

We're using custom selenoid 1.11.3 made with following Dockefile: FROM aerokube/selenoid:1.11.3 ADD ./selenoid/browsers.json /etc/selenoid/browsers.json

and with following browsers.json: { "chrome": { "default": "latest", "versions": { "latest": { "image": "selenoid/chrome", "port": "4444", "path": "/", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} } } }, "firefox": { "default": "125.0", "versions": { "125.0": { "image": "selenoid/vnc_firefox:125.0", "port": "4444", "path": "/wd/hub", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} }, "124.0": { "image": "selenoid/vnc_firefox:124.0", "port": "4444", "path": "/wd/hub", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} } } } }

Selenoid UI version we use is aerokube/selenoid-ui:1.10.11

When we use chrome: latest from capabilities and start manual curl session, everything seems to be running normal: `19 Waiting X server... 2024/10/14 11:06:05 [INIT] [Listening on :7070] Logging to: /dev/null Waiting X server... Starting ChromeDriver 127.0.6533.72 (9755e24ca85aa18ffa16c743f660a3d914902775-refs/branch-heads/6533@{#1760}) on port 4444 All remote connections are allowed. Use an allowlist instead! Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.

--- x11vnc loop: 1 ---

ChromeDriver was started successfully. --- x11vnc loop: waiting for: 178

PORT=5900`

But when we try running the same thing with the firefox, we get this in logs: `19 Waiting X server... Logging to: /dev/null Waiting X server... 2024/10/14 11:08:34 [-] [INIT] [Loading configuration files...] 2024/10/14 11:08:34 [-] [INIT] [Loaded configuration from /tmp/browsers.json] 2024/10/14 11:08:34 [-] [INIT] [Timezone: Europe/Belgrade] 2024/10/14 11:08:34 [-] [INIT] [Listening on :4444]

--- x11vnc loop: 1 ---

2024/10/14 11:08:34 [-] [NEW_REQUEST] [unknown] [172.17.0.2] 2024/10/14 11:08:34 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.17.0.2] 2024/10/14 11:08:34 [0] [LOCATING_SERVICE] [firefox] [125.0] 2024/10/14 11:08:34 [0] [USING_DRIVER] [firefox] [125.0] 2024/10/14 11:08:34 [0] [ALLOCATING_PORT] 2024/10/14 11:08:34 [0] [ALLOCATED_PORT] [45899] 2024/10/14 11:08:34 [0] [STARTING_PROCESS] [[/usr/bin/geckodriver --port=45899]] 1728896914271 geckodriver INFO Listening on 127.0.0.1:45899 2024/10/14 11:08:34 [0] [PROCESS_STARTED] [73] [0.05s] 2024/10/14 11:08:34 [0] [PROXY_TO] [http://127.0.0.1:45899] 2024/10/14 11:08:34 [0] [SESSION_ATTEMPTED] [http://127.0.0.1:45899] [1] 1728896914322 mozrunner::runner INFO Running command: MOZ_CRASHREPORTER="1" MOZ_CRASHREPORTER_NO_REPORT="1" MOZ_CRASHREPORTER_SHUTDOWN="1" MOZ_NO_REMOTE="1" "/usr/bin/firefox" "--marionette" "-no-remote" "-profile" "/tmp/rust_mozprofileJ9Wr4x" console.warn: services.settings: Ignoring preference override of remote settings server console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment [GFX1-]: glxtest: libpci missing [GFX1-]: glxtest: libEGL missing 1728896914710 Marionette INFO Marionette enabled --- x11vnc loop: waiting for: 157

1728896914772 Marionette INFO Listening on port 36173 PORT=5900 Read port: 36173 console.error: ({}) 2024/10/14 11:08:35 [0] [SESSION_CREATED] [8eda4221-ac13-4e9e-b64a-486e95580db8] [1] [1.45s] console.error: "update.locale" " file doesn't exist in either the application or GRE directories" 1728896947238 addons.xpi ERROR System addon update list error SyntaxError: XMLHttpRequest.open: 'http://%(server)s/dummy-system-addons.xml' is not a valid URL.`

We've even tried creating custom docker image for firefox to eliminate libpci missing and libEGL missing, but the rest of the logs was the same as mentioned above.

We've also tried to use latest tag for the firefox, and our browsers.json looked like this: { "chrome": { "default": "latest", "versions": { "latest": { "image": "selenoid/chrome", "port": "4444", "path": "/", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} } } }, "firefox": { "default": "latest", "versions": { "latest": { "image": "selenoid/firefox:latest", "port": "4444", "path": "/wd/hub", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} } } } }

In this case manual curl session couldn't even be started, and these were the logs: docker logs 7588754c15f0 2024/10/14 09:12:08 [-] [INIT] [Loading configuration files...] 2024/10/14 09:12:08 [-] [INIT] [Loaded configuration from /etc/selenoid/browsers.json] 2024/10/14 09:12:08 [-] [INIT] [Video Dir: /opt/selenoid/video] 2024/10/14 09:12:08 [-] [INIT] [Logs Dir: /opt/selenoid/logs] 2024/10/14 09:12:08 [-] [INIT] [Your Docker API version is 1.44] 2024/10/14 09:12:08 [-] [INIT] [Timezone: Europe/Belgrade] 2024/10/14 09:12:08 [-] [INIT] [Listening on :4444] 2024/10/14 09:12:58 [-] [NEW_REQUEST] [unknown] [10.200.0.157, 10.212.0.147, 10.212.0.170] 2024/10/14 09:12:58 [-] [NEW_REQUEST_ACCEPTED] [unknown] [10.200.0.157, 10.212.0.147, 10.212.0.170] 2024/10/14 09:12:58 [7] [LOCATING_SERVICE] [firefox] [latest] 2024/10/14 09:12:58 [7] [USING_DOCKER] [firefox] [latest] 2024/10/14 09:12:58 [7] [CREATING_CONTAINER] [selenoid/firefox] 2024/10/14 09:12:58 [7] [STARTING_CONTAINER] [selenoid/firefox] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] 2024/10/14 09:12:59 [7] [CONTAINER_STARTED] [selenoid/firefox] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] [0.22s] 2024/10/14 09:12:59 [7] [SERVICE_STARTED] [selenoid/firefox] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] [0.25s] 2024/10/14 09:12:59 [7] [PROXY_TO] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] [http://172.17.0.3:4444/wd/hub] 2024/10/14 09:12:59 [7] [SESSION_ATTEMPTED] [http://172.17.0.3:4444/wd/hub] [1] 2024/10/14 09:12:59 [7] [SESSION_FAILED] [http://172.17.0.3:4444/wd/hub] [400 Bad Request] 2024/10/14 09:12:59 [7] [REMOVING_CONTAINER] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] 2024/10/14 09:12:59 [7] [CONTAINER_REMOVED] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223]

Can you please tell us where the issue is and how to use firefox latest in out configuration.

Thank you :)

aandryashin commented 4 days ago

Hello, it is not good practice using latest version, please use versioned tags.

пн, 14 окт. 2024 г., 13:37 Nikola Lecic @.***>:

Hello,

We're using custom selenoid 1.11.3 made with following Dockefile: FROM aerokube/selenoid:1.11.3 ADD ./selenoid/browsers.json /etc/selenoid/browsers.json

and with following browsers.json: { "chrome": { "default": "latest", "versions": { "latest": { "image": "selenoid/chrome", "port": "4444", "path": "/", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} } } }, "firefox": { "default": "125.0", "versions": { "125.0": { "image": "selenoid/vnc_firefox:125.0", "port": "4444", "path": "/wd/hub", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} }, "124.0": { "image": "selenoid/vnc_firefox:124.0", "port": "4444", "path": "/wd/hub", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} } } } }

Selenoid UI version we use is aerokube/selenoid-ui:1.10.11

When we use chrome: latest from capabilities and start manual curl session, everything seems to be running normal: `19 Waiting X server... 2024/10/14 11:06:05 [INIT] [Listening on :7070] Logging to: /dev/null Waiting X server... Starting ChromeDriver 127.0.6533.72 (9755e24ca85aa18ffa16c743f660a3d914902775-refs/branch-heads/6533@{#1760}) on port 4444 All remote connections are allowed. Use an allowlist instead! Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.

--- x11vnc loop: 1 ---

ChromeDriver was started successfully. --- x11vnc loop: waiting for: 178

PORT=5900`

But when we try running the same thing with the firefox, we get this in logs: `19 Waiting X server... Logging to: /dev/null Waiting X server... 2024/10/14 11:08:34 [-] [INIT] [Loading configuration files...] 2024/10/14 11:08:34 [-] [INIT] [Loaded configuration from /tmp/browsers.json] 2024/10/14 11:08:34 [-] [INIT] [Timezone: Europe/Belgrade] 2024/10/14 11:08:34 [-] [INIT] [Listening on :4444]

--- x11vnc loop: 1 ---

2024/10/14 11:08:34 [-] [NEW_REQUEST] [unknown] [172.17.0.2] 2024/10/14 11:08:34 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.17.0.2] 2024/10/14 11:08:34 [0] [LOCATING_SERVICE] [firefox] [125.0] 2024/10/14 11:08:34 [0] [USING_DRIVER] [firefox] [125.0] 2024/10/14 11:08:34 [0] [ALLOCATING_PORT] 2024/10/14 11:08:34 [0] [ALLOCATED_PORT] [45899] 2024/10/14 11:08:34 [0] [STARTING_PROCESS] [[/usr/bin/geckodriver --port=45899]] 1728896914271 geckodriver INFO Listening on 127.0.0.1:45899 2024/10/14 11:08:34 [0] [PROCESS_STARTED] [73] [0.05s] 2024/10/14 11:08:34 [0] [PROXY_TO] [http://127.0.0.1:45899] 2024/10/14 11:08:34 [0] [SESSION_ATTEMPTED] [http://127.0.0.1:45899] [1] 1728896914322 mozrunner::runner INFO Running command: MOZ_CRASHREPORTER="1" MOZ_CRASHREPORTER_NO_REPORT="1" MOZ_CRASHREPORTER_SHUTDOWN="1" MOZ_NO_REMOTE="1" "/usr/bin/firefox" "--marionette" "-no-remote" "-profile" "/tmp/rust_mozprofileJ9Wr4x" console.warn: services.settings: Ignoring preference override of remote settings server console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment [GFX1-]: glxtest: libpci missing [GFX1-]: glxtest: libEGL missing 1728896914710 Marionette INFO Marionette enabled --- x11vnc loop: waiting for: 157

1728896914772 Marionette INFO Listening on port 36173 PORT=5900 Read port: 36173 console.error: ({}) 2024/10/14 11:08:35 [0] [SESSION_CREATED] [8eda4221-ac13-4e9e-b64a-486e95580db8] [1] [1.45s] console.error: "update.locale" " file doesn't exist in either the application or GRE directories" 1728896947238 addons.xpi ERROR System addon update list error SyntaxError: XMLHttpRequest.open: 'http://%(server)s/dummy-system-addons.xml' is not a valid URL.`

We've even tried creating custom docker image for firefox to eliminate libpci missing and libEGL missing, but the rest of the logs was the same as mentioned above.

We've also tried to use latest tag for the firefox, and our browsers.json looked like this: { "chrome": { "default": "latest", "versions": { "latest": { "image": "selenoid/chrome", "port": "4444", "path": "/", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} } } }, "firefox": { "default": "latest", "versions": { "latest": { "image": "selenoid/firefox:latest", "port": "4444", "path": "/wd/hub", "shmSize": 1073741824, "tmpfs": {"/tmp":"size=512m"} } } } }

In this case manual curl session couldn't even be started, and these were the logs: docker logs 7588754c15f0 2024/10/14 09:12:08 [-] [INIT] [Loading configuration files...] 2024/10/14 09:12:08 [-] [INIT] [Loaded configuration from /etc/selenoid/browsers.json] 2024/10/14 09:12:08 [-] [INIT] [Video Dir: /opt/selenoid/video] 2024/10/14 09:12:08 [-] [INIT] [Logs Dir: /opt/selenoid/logs] 2024/10/14 09:12:08 [-] [INIT] [Your Docker API version is 1.44] 2024/10/14 09:12:08 [-] [INIT] [Timezone: Europe/Belgrade] 2024/10/14 09:12:08 [-] [INIT] [Listening on :4444] 2024/10/14 09:12:58 [-] [NEW_REQUEST] [unknown] [10.200.0.157, 10.212.0.147, 10.212.0.170] 2024/10/14 09:12:58 [-] [NEW_REQUEST_ACCEPTED] [unknown] [10.200.0.157, 10.212.0.147, 10.212.0.170] 2024/10/14 09:12:58 [7] [LOCATING_SERVICE] [firefox] [latest] 2024/10/14 09:12:58 [7] [USING_DOCKER] [firefox] [latest] 2024/10/14 09:12:58 [7] [CREATING_CONTAINER] [selenoid/firefox] 2024/10/14 09:12:58 [7] [STARTING_CONTAINER] [selenoid/firefox] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] 2024/10/14 09:12:59 [7] [CONTAINER_STARTED] [selenoid/firefox] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] [0.22s] 2024/10/14 09:12:59 [7] [SERVICE_STARTED] [selenoid/firefox] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] [0.25s] 2024/10/14 09:12:59 [7] [PROXY_TO] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] [ http://172.17.0.3:4444/wd/hub] 2024/10/14 09:12:59 [7] [SESSION_ATTEMPTED] [http://172.17.0.3:4444/wd/hub] [1] 2024/10/14 09:12:59 [7] [SESSION_FAILED] [http://172.17.0.3:4444/wd/hub] [400 Bad Request] 2024/10/14 09:12:59 [7] [REMOVING_CONTAINER] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223] 2024/10/14 09:12:59 [7] [CONTAINER_REMOVED] [1e38d35b00a980f2ec35692797002b0d84cb06d38951a0897cefd9933f55a223]

Can you please tell us where the issue is and how to use firefox latest in out configuration.

Thank you :)

— Reply to this email directly, view it on GitHub https://github.com/aerokube/selenoid/issues/1440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY23KIFSQ6NBBRW54C5KTZ3ONHDAVCNFSM6AAAAABP4WED7KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4DKNJZHAZDSNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

nikolalecic-humanity commented 2 days ago

@aandryashin sorry for the late reply.

Ok that makes sense. But can you please tell me are the logs we're getting when using firefox 125.0 and 124.0 and with manual curl session as expected?

`19 Waiting X server... Logging to: /dev/null Waiting X server... 2024/10/14 11:08:34 [-] [INIT] [Loading configuration files...] 2024/10/14 11:08:34 [-] [INIT] [Loaded configuration from /tmp/browsers.json] 2024/10/14 11:08:34 [-] [INIT] [Timezone: Europe/Belgrade] 2024/10/14 11:08:34 [-] [INIT] [Listening on :4444]

--- x11vnc loop: 1 ---

2024/10/14 11:08:34 [-] [NEW_REQUEST] [unknown] [172.17.0.2] 2024/10/14 11:08:34 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.17.0.2] 2024/10/14 11:08:34 [0] [LOCATING_SERVICE] [firefox] [125.0] 2024/10/14 11:08:34 [0] [USING_DRIVER] [firefox] [125.0] 2024/10/14 11:08:34 [0] [ALLOCATING_PORT] 2024/10/14 11:08:34 [0] [ALLOCATED_PORT] [45899] 2024/10/14 11:08:34 [0] [STARTING_PROCESS] [[/usr/bin/geckodriver --port=45899]] 1728896914271 geckodriver INFO Listening on 127.0.0.1:45899 2024/10/14 11:08:34 [0] [PROCESS_STARTED] [73] [0.05s] 2024/10/14 11:08:34 [0] [PROXY_TO] [http://127.0.0.1:45899] 2024/10/14 11:08:34 [0] [SESSION_ATTEMPTED] [http://127.0.0.1:45899] [1] 1728896914322 mozrunner::runner INFO Running command: MOZ_CRASHREPORTER="1" MOZ_CRASHREPORTER_NO_REPORT="1" MOZ_CRASHREPORTER_SHUTDOWN="1" MOZ_NO_REMOTE="1" "/usr/bin/firefox" "--marionette" "-no-remote" "-profile" "/tmp/rust_mozprofileJ9Wr4x" console.warn: services.settings: Ignoring preference override of remote settings server console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment [GFX1-]: glxtest: libpci missing [GFX1-]: glxtest: libEGL missing 1728896914710 Marionette INFO Marionette enabled --- x11vnc loop: waiting for: 157

1728896914772 Marionette INFO Listening on port 36173 PORT=5900 Read port: 36173 console.error: ({}) 2024/10/14 11:08:35 [0] [SESSION_CREATED] [8eda4221-ac13-4e9e-b64a-486e95580db8] [1] [1.45s] console.error: "update.locale" " file doesn't exist in either the application or GRE directories" 1728896947238 addons.xpi ERROR System addon update list error SyntaxError: XMLHttpRequest.open: 'http://%(server)s/dummy-system-addons.xml' is not a valid URL.`

aandryashin commented 2 days ago

Most probably firefox image is old, we did not rebuild it 6 months, try to build you own image from sources:

https://github.com/aerokube/images

ср, 16 окт. 2024 г., 10:20 Nikola Lecic @.***>:

@aandryashin https://github.com/aandryashin sorry for the late reply.

Ok that makes sense. But can you please tell me are the logs we're getting when using firefox 125.0 and 124.0 and with manual curl session as expected?

`19 Waiting X server... Logging to: /dev/null Waiting X server... 2024/10/14 11:08:34 [-] [INIT] [Loading configuration files...] 2024/10/14 11:08:34 [-] [INIT] [Loaded configuration from /tmp/browsers.json] 2024/10/14 11:08:34 [-] [INIT] [Timezone: Europe/Belgrade] 2024/10/14 11:08:34 [-] [INIT] [Listening on :4444]

--- x11vnc loop: 1 ---

2024/10/14 11:08:34 [-] [NEW_REQUEST] [unknown] [172.17.0.2] 2024/10/14 11:08:34 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.17.0.2] 2024/10/14 11:08:34 [0] [LOCATING_SERVICE] [firefox] [125.0] 2024/10/14 11:08:34 [0] [USING_DRIVER] [firefox] [125.0] 2024/10/14 11:08:34 [0] [ALLOCATING_PORT] 2024/10/14 11:08:34 [0] [ALLOCATED_PORT] [45899] 2024/10/14 11:08:34 [0] [STARTING_PROCESS] [[/usr/bin/geckodriver --port=45899]] 1728896914271 geckodriver INFO Listening on 127.0.0.1:45899 2024/10/14 11:08:34 [0] [PROCESS_STARTED] [73] [0.05s] 2024/10/14 11:08:34 [0] [PROXY_TO] [http://127.0.0.1:45899] 2024/10/14 11:08:34 [0] [SESSION_ATTEMPTED] [http://127.0.0.1:45899] [1] 1728896914322 mozrunner::runner INFO Running command: MOZ_CRASHREPORTER="1" MOZ_CRASHREPORTER_NO_REPORT="1" MOZ_CRASHREPORTER_SHUTDOWN="1" MOZ_NO_REMOTE="1" "/usr/bin/firefox" "--marionette" "-no-remote" "-profile" "/tmp/rust_mozprofileJ9Wr4x" console.warn: services.settings: Ignoring preference override of remote settings server console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment [GFX1-]: glxtest: libpci missing [GFX1-]: glxtest: libEGL missing 1728896914710 Marionette INFO Marionette enabled --- x11vnc loop: waiting for: 157

1728896914772 Marionette INFO Listening on port 36173 PORT=5900 Read port: 36173 console.error: ({}) 2024/10/14 11:08:35 [0] [SESSION_CREATED] [8eda4221-ac13-4e9e-b64a-486e95580db8] [1] [1.45s] console.error: "update.locale" " file doesn't exist in either the application or GRE directories" 1728896947238 addons.xpi ERROR System addon update list error SyntaxError: XMLHttpRequest.open: 'http://%(server)s/dummy-system-addons.xml' is not a valid URL.`

— Reply to this email directly, view it on GitHub https://github.com/aerokube/selenoid/issues/1440#issuecomment-2415933553, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY23I4UNS7NXT7HAKKI3TZ3YHVBAVCNFSM6AAAAABP4WED7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVHEZTGNJVGM . You are receiving this because you were mentioned.Message ID: @.***>