pa11y / pa11y-ci

Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
https://pa11y.org
GNU Lesser General Public License v3.0
509 stars 62 forks source link

Failing to run on ubuntu-22.04 #198

Open TimboTambo opened 1 year ago

TimboTambo commented 1 year ago

A few weeks ago our pa11y-ci tests started failing on Github runners when targeting ubuntu-latest, coinciding with Github updating latest to target version 22.04.1 (previously version 20.04.5).

We are using the latest version of pa11y-ci (version 3.0.1). The failure message was Failed to run against the URL (as pictured) and the error thrown, logged by the reporter was {"name":"TimeoutError"}. Screenshot 2022-12-20 at 09 46 41

We updated the Github action to target Ubuntu version 20.04.5 and the tests started passing again. I've looked through the release notes for version 22.04 and can't see anything in particular that might cause these failures.

kussmaul commented 1 year ago

I had a similar experience with Fedora Core - tests started failing with "Failed to run". In my case, the problem was the browser path, which I fixed by setting defaults.chromeLaunchConfig.executablePath in the pa11y-ci config file.

aabccd021 commented 1 year ago

I've got it working on ubuntu-22.04 by setting the field defaults.chromeLaunchConfig.executablePath as mentioned by @kussmaul, set with value which solved similar issue.

{
  "defaults": {
    "chromeLaunchConfig": {
      "executablePath": "/usr/bin/google-chrome"
    }
  }
}
yous commented 1 year ago

For CircleCI, I've fixed this by adding --no-sandbox to defaults.chromeLaunchConfig.args:

{
  "defaults": {
    "chromeLaunchConfig": {
      "args": [
        "--no-sandbox"
      ]
    }
  }
}

See https://github.com/pa11y/pa11y-ci/blob/master/README.md#docker.

thiguet commented 1 year ago

We could add this to the docs. It would be helpful for those configuring CircleCI and Github. If possible I'll submit a PR later.