Skip to content

[🐛 Bug]: SE_NODE_STEREOTYPE_EXTRA not merged into config.toml in Docker Hub-Node mode #2968

@Tiamoz01

Description

@Tiamoz01

Description

I’m running Selenium Grid Hub in WSL and starting a Chrome Node container with the following command:·

docker run -d \
  -e SE_EVENT_BUS_HOST=<event_bus_ip_or_name> \
  -e SE_NODE_STEREOTYPE_EXTRA='{"myApp:version":"beta","myApp:publish":"public"}' \
  --shm-size="2g" \
  selenium/node-chrome:4.35.0-20250909

Problem:

The environment variable SE_NODE_STEREOTYPE_EXTRA is not automatically merged into config.toml.

As a result, the Node's stereotype does not include the custom attributes, and I cannot target a specific Node in my tests using myApp:version.

I tried a workaround by mounting a custom config.toml into the Node container and starting the Node with:

java -jar /opt/selenium/selenium-server.jar node --config /opt/selenium/config.toml

This successfully overrides the Node stereotype.

However, when I specify options.set_capability('myApp:version', 'beta') in the client, the Node container logs an exception:

Exception managing chrome: Unable to discover proper chromedriver version in offline mode

Request / Question:

Is there a supported way to:

Add custom stereotype attributes to a Node using Docker Hub-Node mode (so SE_NODE_STEREOTYPE_EXTRA works correctly), and

Avoid issues with ChromeDriver version detection when using these custom capabilities?

This would allow targeting specific Nodes for automated tests without breaking ChromeDriver integration.

Reproducible Code

Start Selenium Hub:

docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium/hub:4.35.0-20250909


Start Node with custom stereotype:

docker run -d \
  --link selenium-hub:hub \
  -e SE_EVENT_BUS_HOST=selenium-hub \
  -e SE_NODE_STEREOTYPE_EXTRA='{"myApp:version":"beta"}' \
  --shm-size="2g" \
  selenium/node-chrome:4.35.0-20250909


Run a Selenium client targeting myApp:version:

from selenium import webdriver
from selenium.webdriver import ChromeOptions

options = ChromeOptions()
options.set_capability("myApp:version", "beta")
driver = webdriver.Remote(
    command_executor="http://localhost:4444",
    options=options
)


Actual Result:

Node does not recognize myApp:version.

Using a mounted config.toml triggers ChromeDriver version detection errors.

Environment:

Selenium 4.35.0-20250909

Docker Desktop on WSL2

Python 3.12

ℹ️ Last known working version: 4.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions