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

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

Open
nikolalecic-humanity opened this issue Oct 14, 2024 · 4 comments

Comments

@nikolalecic-humanity
Copy link

nikolalecic-humanity commented Oct 14, 2024

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
Copy link
Member

aandryashin commented Oct 14, 2024 via email

@nikolalecic-humanity
Copy link
Author

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

aandryashin commented Oct 16, 2024 via email

@nikolalecic-humanity
Copy link
Author

@aandryashin

Hello again. I've built a new image:
./images firefox -b 131.0.2+build1-0ubuntu0.22.04.1~mt1 -d 0.35.0 --selenoid-version 1.11.3 -t selenoid:firefox-131.0
and made couple of adjustments to remove warning messages:

FROM selenoid:firefox-131.0
USER root
RUN apt-get update && apt-get install -y dbus-x11 libegl1 libpci-dev mesa-utils xvfb x11vnc && rm -rf /var/lib/apt/lists/*

Now when I run my custom firefox 131.0 image I get these logs:
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
19
Waiting X server...
Logging to: /dev/null
Waiting X server...
2024/10/21 09:51:12 [-] [INIT] [Loading configuration files...]
2024/10/21 09:51:12 [-] [INIT] [Loaded configuration from /tmp/browsers.json]
2024/10/21 09:51:12 [-] [INIT] [Timezone: Europe/Belgrade]
2024/10/21 09:51:12 [-] [INIT] [Listening on :4444]

--- x11vnc loop: 1 ---

2024/10/21 09:51:12 [-] [NEW_REQUEST] [unknown] [172.17.0.2]
2024/10/21 09:51:12 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.17.0.2]
2024/10/21 09:51:12 [0] [LOCATING_SERVICE] [firefox] [131.0]
2024/10/21 09:51:12 [0] [USING_DRIVER] [firefox] [131.0]
2024/10/21 09:51:12 [0] [ALLOCATING_PORT]
2024/10/21 09:51:12 [0] [ALLOCATED_PORT] [33569]
2024/10/21 09:51:12 [0] [STARTING_PROCESS] [[/usr/bin/geckodriver --port=33569]]
1729497072687 geckodriver INFO Listening on 127.0.0.1:33569
2024/10/21 09:51:12 [0] [PROCESS_STARTED] [73] [0.05s]
2024/10/21 09:51:12 [0] [PROXY_TO] [http://127.0.0.1:33569]
2024/10/21 09:51:12 [0] [SESSION_ATTEMPTED] [http://127.0.0.1:33569] [1]
1729497072739 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_mozprofiles9371R"
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
1729497073128 Marionette INFO Marionette enabled
--- x11vnc loop: waiting for: 166

1729497073202 Marionette INFO Listening on port 43495
PORT=5900
Read port: 43495
console.error: ({})
2024/10/21 09:51:14 [0] [SESSION_CREATED] [de242bac-9f39-400a-bb38-86873ffb7e33] [1] [1.60s]

I assume this is ok now? Can you please confirm, than you can close this issue.

Thank you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants