[🐛 Bug]: Unable to start an older version of the browser using the Selenium server

Open
#18,386 9 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java

Research direction

Start with DefaultSlotMatcher.browserVersionMatch and the SemanticVersionComparator it calls. The reporter found that an empty browser version from the node stereotype causes every versioned request to be rejected, so the open question is whether that check should be relaxed. Reproduce with the standalone grid and the ChromeOptions setBrowserVersion("157") snippet. Done needs a maintainer decision on whether non-numeric channels like beta, dev, canary and esr should match, followed by a fix and a test.

Written by the indexing model from the issue text.

Description

A-needs-triaging B-grid C-java I-defect OS-windows
Description

I tried to use an older version of the browser as advertised here to workaround a crash in the latest chrom v158

But the session startup did fail: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Could not start a new session. No nodes support the capabilities in the request

The DefaultSlotMatcher.browserVersionMatch does expect the stereotype to report a browser version, but in my case the stereotype does report an empty string back, so all versions set are rejected (beside 'stable'). The SemanticVersionComparator does return 1 for v1 = '' amd v2 = '157' and we filter for == 0.

I am asking myself why we have the browserVersionMatch at all, as the server can not know at this point what versions the Selenium Manager could download. Why don't we allow values like beta, dev, canary, esr to be used with the Selenium server? We could hide this behind a flag, if there is a good reason for this.

@VietND96 do you know why do match the browser version at all? This might be left over from the time before the Selenium Manager has been implemented, so we might need to modernize this?

Reproducible Code
// start servers
        org.openqa.selenium.grid.Bootstrap.main("standalone --host 127.0.0.1 --port 4567 --reject-unsupported-caps true --session-timeout 3600".split(" "));
        
        // wait for the server to get ready, yes there are better ways to do so
        Thread.sleep(10_000);

        var options = new ChromeOptions();
        options.setBrowserVersion("157");
        
        WebDriver webDriver = new RemoteWebDriver(URI.create("http://127.0.0.1:4567/wd/hub").toURL(), options);
        
        webDriver.getCurrentUrl();
        webDriver.quit();
        // shutdown the servers
        System.exit(0);
Dominant language
Java
Stars
34.6k
Forks
8.7k
Avg merge
1d 16h
Merged PRs (30d)
107

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SeleniumHQ/selenium

All issues in SeleniumHQ/selenium

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.