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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Standalone-Firefox: Bidi not active? #2220

Closed
AB-xdev opened this issue Apr 23, 2024 · 6 comments
Closed

[馃悰 Bug]: Standalone-Firefox: Bidi not active? #2220

AB-xdev opened this issue Apr 23, 2024 · 6 comments

Comments

@AB-xdev
Copy link

AB-xdev commented Apr 23, 2024

What happened?

I'm running some integration tests in testcontainers (java) using selenium/standalone-firefox:4.19.1.

However after creating the RemoteWebDriver it says that se:bidiEnabled is false despite the fact that Firefox should have support for that:

Webdriver capabilities look like this:
g

cdp is present but bidi is missing.
I couldn't find any reason inside the docs why this is the case (the docs even say that you SHOULD use bidi instead of cdp).

Is it possible that Bidi is somehow disabled inside the image?
If so is there any related documentation that describes how it can be enabled?

Command used to start Selenium Grid with Docker (or Kubernetes)

Started by Testcontainers using Docker API without run command.

Here's the output of the inspect command
[
    {
        "Id": "b250f90df1934d79bb1c44975220ad19027d7d1f97fd2d19435a698c5a5cdc4f",
        "Created": "2024-04-23T15:15:28.458838229Z",
        "Path": "/opt/bin/entry_point.sh",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 95045,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2024-04-23T15:15:29.152663142Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:0220df191d15daedca00246c93a84276eb4b972a947d82314727e4aeb195c328",
        "ResolvConfPath": "/var/lib/docker/containers/<truncated>/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/<truncated>/hostname",
        "HostsPath": "/var/lib/docker/containers/<truncated>/hosts",
        "LogPath": "/var/lib/docker/containers/<truncated>/<truncated>-json.log",
        "Name": "/selenium-firefox-1-1-96140ee7-5f90-4891-b81f-69b06734f8d6",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "553f0e9c98fe00267787d84cd0e8dcd6ce676bd186a5559fe53c46bc1718b4cf",
            "PortBindings": {
                "4444/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "61096"
                    }
                ],
                "7900/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "61094"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": [],
            "ConsoleSize": [
                0,
                0
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": [],
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 2147483648,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 805306368,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 1610612736,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware",
                "/sys/devices/virtual/powercap"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/<truncated>",
                "MergedDir": "/var/lib/docker/overlay2/<truncated>/merged",
                "UpperDir": "/var/lib/docker/overlay2/<truncated>/diff",
                "WorkDir": "/var/lib/docker/overlay2/<truncated>/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [],
        "Config": {
            "Hostname": "b250f90df193",
            "Domainname": "",
            "User": "1200",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "4444/tcp": {},
                "5900/tcp": {},
                "7900/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "SE_SCREEN_WIDTH=1600",
                "SE_SCREEN_HEIGHT=900",
                "TZ=Europe/Berlin",
                "SE_NODE_SESSION_TIMEOUT=3600",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "DEBIAN_FRONTEND=noninteractive",
                "DEBCONF_NONINTERACTIVE_SEEN=true",
                "SEL_USER=seluser",
                "SEL_UID=1200",
                "SEL_GID=1201",
                "HOME=/home/seluser",
                "SEL_DOWNLOAD_DIR=/home/seluser/Downloads",
                "SE_BIND_HOST=false",
                "SE_REJECT_UNSUPPORTED_CAPS=false",
                "SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED=true",
                "SE_OTEL_TRACES_EXPORTER=otlp",
                "LANG_WHICH=en",
                "LANG_WHERE=US",
                "ENCODING=UTF-8",
                "LANGUAGE=en_US.UTF-8",
                "LANG=en_US.UTF-8",
                "SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=false",
                "SE_BROWSER_LEFTOVERS_INTERVAL_SECS=3600",
                "SE_BROWSER_LEFTOVERS_PROCESSES_SECS=7200",
                "SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS=1",
                "SE_SCREEN_DEPTH=24",
                "SE_SCREEN_DPI=96",
                "SE_START_XVFB=true",
                "SE_START_VNC=true",
                "SE_START_NO_VNC=true",
                "SE_NO_VNC_PORT=7900",
                "SE_VNC_PORT=5900",
                "DISPLAY=:99.0",
                "DISPLAY_NUM=99",
                "CONFIG_FILE=/opt/selenium/config.toml",
                "GENERATE_CONFIG=true",
                "SE_DRAIN_AFTER_SESSION_COUNT=0",
                "SE_OFFLINE=true",
                "SE_NODE_MAX_SESSIONS=1",
                "SE_NODE_OVERRIDE_MAX_SESSIONS=false",
                "SE_NODE_HEARTBEAT_PERIOD=30",
                "DBUS_SESSION_BUS_ADDRESS=/dev/null",
                "SE_OTEL_SERVICE_NAME=selenium-standalone",
                "SE_SESSION_REQUEST_TIMEOUT=300",
                "SE_SESSION_RETRY_INTERVAL=15",
                "SE_HEALTHCHECK_INTERVAL=120",
                "SE_RELAX_CHECKS=true"
            ],
            "Cmd": [
                "/opt/bin/entry_point.sh"
            ],
            "Image": "selenium/standalone-firefox:4.19.1",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "authors": "",
                "org.opencontainers.image.ref.name": "ubuntu",
                "org.opencontainers.image.version": "22.04",
                "org.testcontainers": "true",
                "org.testcontainers.lang": "java",
                "org.testcontainers.sessionId": "12f96e55-067d-4683-afb3-a6d00c914c88",
                "org.testcontainers.version": "1.19.7"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "52b64de3b83edfc63dc3863b00cdf51e707de02350e743183000fa2cb1aa6162",
            "SandboxKey": "/var/run/docker/netns/52b64de3b83e",
            "Ports": {
                "4444/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "61096"
                    }
                ],
                "5900/tcp": null,
                "7900/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "61094"
                    }
                ]
            },
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "1682f33a-9d84-4401-9f0e-cd7be1ec0bd9": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "tc-eE7wUQ7C"
                    ],
                    "MacAddress": "02:42:c0:a8:60:02",
                    "NetworkID": "553f0e9c98fe00267787d84cd0e8dcd6ce676bd186a5559fe53c46bc1718b4cf",
                    "EndpointID": "0b470f4662a7a46711f2cc2c5b49360db2055c94fa38acb6e7e1cb232481a887",
                    "Gateway": "192.168.96.1",
                    "IPAddress": "192.168.96.2",
                    "IPPrefixLen": 20,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "DriverOpts": null,
                    "DNSNames": [
                        "selenium-firefox-1-1-96140ee7-5f90-4891-b81f-69b06734f8d6",
                        "tc-eE7wUQ7C",
                        "b250f90df193"
                    ]
                }
            }
        }
    }
]

Operating System

Windows / Docker Desktop

Docker Selenium version (image tag)

4.19.1

Selenium Grid chart version (chart version)

No response

Copy link

@AB-xdev, 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!

@AB-xdev AB-xdev changed the title [馃悰 Bug]: Standalone-Firefox: Bidi disabled [馃悰 Bug]: Standalone-Firefox: Bidi not active? Apr 23, 2024
@VietND96
Copy link
Member

While starting the container, did you set this env var SE_NODE_ENABLE_CDP is true?
For bidi breakage changes, can you see https://www.selenium.dev/blog/2024/bidi-java-breaking-change/

@AB-xdev
Copy link
Author

AB-xdev commented Apr 23, 2024

Thank you for the quick response.

While starting the container, did you set this env var SE_NODE_ENABLE_CDP is true?

As seen above in the docker inspect this variable is not set by me.

For bidi breakage changes, can you see https://www.selenium.dev/blog/2024/bidi-java-breaking-change/

We are already using the new imports inside the Java code that controls the test/containers (otherwise it won't compile) so it's likely a problem directly inside the container (where we didn't change anything).

@diemol
Copy link
Member

diemol commented Apr 23, 2024

How are you creating the session? What capabilities are you sending? Are you setting webSocketUrl: true?

@AB-xdev
Copy link
Author

AB-xdev commented Apr 24, 2024

How are you creating the session? What capabilities are you sending? Are you setting webSocketUrl: true?

Uhm no I didn't.
Set it to true, now it works :)
Thank you ^^

Is this documented somewhere? After specially searching for it I only found this in the MDN docs: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/webSocketUrl

@diemol diemol closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
Copy link

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.

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

No branches or pull requests

3 participants