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

オープン
#18,386 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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);
主要言語
Java
スター
34.6k
フォーク
8.7k
平均マージ
1日 16時間
マージ済み PR(30日)
107

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SeleniumHQ/selenium のほかの issue

SeleniumHQ/selenium の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。