Skip to content
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

Fix issues when running GitHub actions with ubuntu-24 #5484

Open
4 tasks
romaricpascal opened this issue Nov 11, 2024 · 0 comments
Open
4 tasks

Fix issues when running GitHub actions with ubuntu-24 #5484

romaricpascal opened this issue Nov 11, 2024 · 0 comments

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Nov 11, 2024

What

Fix issue with the lack of sandbox in Ubuntu 23.10+ that prevents Puppeteer from running in our GitHub Actions workflows:

Why

GitHub has updated ubuntu-latest to be ubuntu 24 on Dec 5th. In that version, our tests relying on Puppeteer fail with the following error message:

Error: Jest: Got error running globalSetup - /home/runner/work/govuk-frontend/govuk-frontend/shared/helpers/jest/browser/open.mjs, reason: Failed to launch the browser process!
[1997:1997:0106/113354.813642:FATAL:zygote_host_impl_linux.cc(128)] No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces with AppArmor, see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md. Otherwise see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the (older) SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
[0106/113354.822697:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0106/113354.822739:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)


TROUBLESHOOTING: https://pptr.dev/troubleshooting

    at ChildProcess.onClose (/home/runner/work/govuk-frontend/govuk-frontend/node_modules/@puppeteer/browsers/lib/cjs/launch.js:312:24)
    at ChildProcess.emit (node:events:536:35)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12)
Error: Process completed with exit code 1.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • Tests that use Puppeteer run without error on ubuntu-latest
  • GitHub actions running on ubuntu-22.04 run again on ubuntu-latest for:
    • The govuk-frontend repository
    • The govuk-design-system repository
    • The govuk-frontend-docs repository
@romaricpascal romaricpascal moved this to Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Nov 11, 2024
@romaricpascal romaricpascal changed the title Test running GitHub Actions workflows on ubuntu 24 instead of ubuntu-latest Fix issues when running GitHub actions with ubuntu-24 Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog 🏃🏼‍♀️
Development

No branches or pull requests

1 participant