Skip to content

Chrome fails with 'Running as root without --no-sandbox' on Lighthouse audit runs #110

Description

@tsira

Bug

lhci collect crashes with:

LH:ChromeLauncher:error Running as root without --no-sandbox is not supported.
Error: Lighthouse failed with exit code 1

Root cause

entrypoint.sh generates a lighthouserc.yml with --no-sandbox in puppeteerLaunchOptions. Those flags apply to the Puppeteer browser used for cookie setup only. The Lighthouse audit runs a separate Chrome process via LH:ChromeLauncher that does not receive those flags.

Running as root in Docker without --no-sandbox is rejected by Chrome 147+.

Environment

  • Action version: v1.4.0
  • Chrome: 147.0.7727.116-1
  • Runner: ubuntu-24.04 image 20260413.86.1
  • Failure is environment-dependent (runners with permissive seccomp pass; others fail)

Fix

Add settings.chromeFlags to the collect block in the generated lighthouserc.yml. PR: #109

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions