Skip to content

Fix Jasmine specs in govuk-docker on Apple silicon#2723

Merged
floehopper merged 1 commit intomainfrom
fix-jasmine-specs-on-apple-silicon
Feb 16, 2024
Merged

Fix Jasmine specs in govuk-docker on Apple silicon#2723
floehopper merged 1 commit intomainfrom
fix-jasmine-specs-on-apple-silicon

Conversation

@floehopper
Copy link
Contributor

@floehopper floehopper commented 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 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 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.

Note that I've opened a PR on jasmine-browser-runner to bump its version of selenium-webdriver. Once that PR is merged and released, we should be able to remove the resolution entry for selenium-webdriver.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants