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

Abierto
#18,386 9 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
1-2 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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);
Lenguaje dominante
Java
Estrellas
34.6k
Forks
8.7k
Merge medio
1 d 16 h
PR fusionados (30 d)
107

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SeleniumHQ/selenium

Todos los issues de SeleniumHQ/selenium

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.