-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rust] Support for Chromium (#12511) #12890
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aguspe
pushed a commit
to aguspe/selenium
that referenced
this pull request
Oct 22, 2023
[rust] Detect chromium browser in path (SeleniumHQ#12511) Co-authored-by: Titus Fortner <[email protected]>
floehopper
added a commit
to alphagov/signon
that referenced
this pull request
Feb 16, 2024
We've been seeing the following error running the Jasmine specs in a govuk-docker container running on Apple silicon: SessionNotCreatedError: session not created: Chrome failed to start: exited normally. For a full diagnosis of the problem see this govuk-docker PR [1] which was a first attempt at fixing the problem. Note that the problem was also triggering a warning like the following even on non-Apple silicon: The chromedriver version (120.0.6099.199) detected in PATH at /usr/bin/chromedriver might not be compatible with the detected chrome version (121.0.6167.85); currently, chromedriver 121.0.6167.85 is recommended for chrome 121.*, so it is advised to delete the driver in PATH and retry This PR forces yarn to install v4.17.0 of the `selenium-webdriver` node package which includes a fix [2] to the `selenium-manager` CLI app included in the `selenium-webdriver` node package so that it now correctly finds the chromium binary. This fixes both the error on Apple silicon and the warning on all devices. [1]: alphagov/govuk-docker#724 [2]: SeleniumHQ/selenium#12890
floehopper
added a commit
to floehopper/jasmine-browser-runner
that referenced
this pull request
Feb 16, 2024
To include this fix [1] for correct detection of a chromium binary. [1]: SeleniumHQ/selenium#12890
floehopper
added a commit
to alphagov/signon
that referenced
this pull request
Feb 16, 2024
We've been seeing the following error running the Jasmine specs in a govuk-docker container running on Apple silicon: SessionNotCreatedError: session not created: Chrome failed to start: exited normally. For a full diagnosis of the problem see this govuk-docker PR [1] which was a first attempt at fixing the problem. Note that the problem was also triggering a warning like the following even on non-Apple silicon: The chromedriver version (120.0.6099.199) detected in PATH at /usr/bin/chromedriver might not be compatible with the detected chrome version (121.0.6167.85); currently, chromedriver 121.0.6167.85 is recommended for chrome 121.*, so it is advised to delete the driver in PATH and retry This PR forces yarn to install v4.17.0 of the `selenium-webdriver` node package which includes a fix [2] to the `selenium-manager` CLI app included in the `selenium-webdriver` node package so that it now correctly finds the chromium binary. This fixes both the error on Apple silicon and the warning on all devices. [1]: alphagov/govuk-docker#724 [2]: SeleniumHQ/selenium#12890
richardTowers
added a commit
to alphagov/whitehall
that referenced
this pull request
Feb 16, 2024
We've been seeing the following error running the Jasmine specs in a govuk-docker container running on Apple silicon: SessionNotCreatedError: session not created: Chrome failed to start: exited normally. For a full diagnosis of the problem see this govuk-docker PR [1] which was a first attempt at fixing the problem. Note that the problem was also triggering a warning like the following even on non-Apple silicon: The chromedriver version (120.0.6099.199) detected in PATH at /usr/bin/chromedriver might not be compatible with the detected chrome version (121.0.6167.85); currently, chromedriver 121.0.6167.85 is recommended for chrome 121.*, so it is advised to delete the driver in PATH and retry This PR forces yarn to install v4.17.0 of the `selenium-webdriver` node package which includes a fix [2] to the `selenium-manager` CLI app included in the `selenium-webdriver` node package so that it now correctly finds the chromium binary. This fixes both the error on Apple silicon and the warning on all devices. [1]: alphagov/govuk-docker#724 [2]: SeleniumHQ/selenium#12890 Co-Authored-By: <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR includes support for detecting Chromium when Chrome is not available. Resolves #12511.
I've analyzed how Chromium is released. Like CfT, Chromium is released as portable binaries, distributed as zip files for Windows, Linux, and macOS (see Chromium download page). This way, it is not a standard way to detect if Chromium is "installed" in a given machine. Moreover, the Chromium executable file is called "chrome" (chrome.exe in Windows), like Chrome.
Nevertheless, there is a case in which Chromium is actually installed in the system. This might happen in Ubuntu systems, installing Chromium through atp or snap, for instance as follows:
When that happens, Chromium can be found by analyzing the PATH. In these cases, the Chromium binaries can be
chromium-browser
orchromium
(see discussion).Therefore, when Chrome is not discovered, this PR looks for these binaries in the PATH.
The following snippet showcases how this feature works in a Linux machine in which Chrome is not available but Chromium has been installed through snap:
Motivation and Context
This PR implements #12511. Also, this feature will allow to prevent issues like reported in #12828.
Types of changes
Checklist