Skip to content

Fix: beginner devcontainer cannot install Playwright on Debian 11 - #91

Open
sinduri-g wants to merge 1 commit into
off-on-dev:mainfrom
sindurigf:fix/beginner-devcontainer-bookworm
Open

Fix: beginner devcontainer cannot install Playwright on Debian 11#91
sinduri-g wants to merge 1 commit into
off-on-dev:mainfrom
sindurigf:fix/beginner-devcontainer-bookworm

Conversation

@sinduri-g

@sinduri-g sinduri-g commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Problem

  • Beginner level cannot start in a fresh Codespace
  • post-create.sh runs npx playwright install --with-deps chromium, which fails: libglx-mesa0 and libxfont2 both 404 from the bullseye-security pool
  • The script uses set -e, so it aborts there and no browser is ever installed
  • Tests then fail with Executable doesn't exist at .../chrome-headless-shell, and the npx playwright install it suggests fails the same way
  • Reproduced on a freshly pulled base:bullseye, on amd64 and arm64

Fix

  • base:bullseyebase:bookworm
  • One word, one file

Why not stay on Debian 11

  • Playwright 1.62 refuses it outright: does not support chromium on debian11-x64
  • The existing ^1.61.0 range picks up 1.62 on the next lockfile refresh, so any Debian 11 workaround is temporary

Verified on bookworm, level otherwise unchanged

  • npm ci and playwright install --with-deps chromium both succeed
  • chromium.executablePath() resolves a real Chrome, so Lighthouse's CHROME_PATH works
  • npm run test:a11y fails on color-contrast, image-alt and the keyboard test, which are the intentional bugs
  • npm run test:lighthouse scores 80, as documented
  • No change to package.json, lockfile, tests, verify.sh, or challenge content

For reviewers

  • Existing Codespaces for this level need a container rebuild
  • Only devcontainer not on bullseye; the other 16 do not run a browser

🤖 Generated with Claude Code

…tall

The level cannot start in a fresh Codespace. post-create.sh runs
`npx playwright install --with-deps chromium`, which fails on Debian 11:

    E: Failed to fetch .../bullseye-security/.../libglx-mesa0_20.3.5-1+deb11u1  404
    E: Failed to fetch .../bullseye-security/.../libxfont2_2.0.4-1+deb11u1      404

post-create.sh uses `set -e`, so it aborts there, no browser is ever
installed, and the tests report:

    Executable doesn't exist at .../chrome-headless-shell
    Please run: npx playwright install

That advice fails the same way. Reproduced on a freshly pulled
mcr.microsoft.com/devcontainers/base:bullseye on both amd64 and arm64,
with a healthy apt index.

Debian 12 installs the same packages cleanly, and Playwright has dropped
Debian 11 entirely: 1.62 refuses with "does not support chromium on
debian11-x64" before it looks at any library, so the existing `^1.61.0`
range would break again on the next lockfile refresh.

Verified on bookworm with the level otherwise unchanged, so the challenge
itself is unaffected:

  - npm ci, playwright install --with-deps chromium: both succeed
  - chromium.executablePath() resolves a real Chrome for Lighthouse's CHROME_PATH
  - npm run test:a11y fails on color-contrast, image-alt and the keyboard
    test, which are the level's intentional bugs
  - npm run test:lighthouse scores 80, matching what the level documents

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: sindurigf <sinduri.g@gmail.com>
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