# Dev Container Chrome wrapper does not recognise Playwright's chrome-linux64 directory

**URL:** <https://meta.discourse.org/t/dev-container-chrome-wrapper-does-not-recognise-playwrights-chrome-linux64-directory/417556>\
**Category:** Bug\
**Tags:** dev-install\
**Created:** [November 16, 2026, 4:46pm UTC](https://meta.discourse.org/t/dev-container-chrome-wrapper-does-not-recognise-playwrights-chrome-linux64-directory/417556 "2026-11-16T16:46:24Z")\
**Posts on this page:** 1\
**Page:** 1

## AI-generated summary

[Ethsim2](/t/-/417556/1) reports a bug in the Discourse Dev Container where the Chrome wrapper fails to detect the Chromium executable installed by Playwright. After running `pnpm playwright-install`, Playwright places Chrome in a `chrome-linux64` directory, but the wrapper script at `.devcontainer/scripts/chrome_wrapper` expects the path to be under `chrome-linux`. This path mismatch causes `google-chrome --version` to report that no browser is found, leading to an `ArgumentError: Malformed version number string` when running QUnit tests.

The reporter provides a workaround involving two steps: first, creating a symlink from `chrome-linux64` to `chrome-linux`, and second, installing missing shared libraries via `pnpm exec playwright install-deps chromium`. After applying these fixes, the browser is correctly detected, and the QUnit test suite passes with 63 successful tests.

To permanently resolve this, the author suggests updating the Chrome wrapper script to recognize both `chrome-linux` and `chrome-linux64` directory structures. Additionally, they recommend improving error handling in `lib/chrome_installed_checker.rb` to provide clearer diagnostics when browser version parsing fails.

<div class="post-metadata">

**Author:** ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)\
**Post date:** [November 16, 2026, 4:46pm UTC](https://meta.discourse.org/t/dev-container-chrome-wrapper-does-not-recognise-playwrights-chrome-linux64-directory/417556/1 "2026-11-16T16:46:24Z")

</div>

## Problem

While running frontend QUnit tests in a fresh Discourse Dev Container, I encountered an issue with the Chrome wrapper at `.devcontainer/scripts/chrome_wrapper`.

After installing Chromium using:

```bash
pnpm playwright-install

```

Playwright downloaded Chrome for Testing **156.0.8078.4** into:

```plaintext
/home/discourse/.cache/ms-playwright/chromium-1248/chrome-linux64/chrome

```

However, the wrapper looks for:

```plaintext
/home/discourse/.cache/ms-playwright/chromium-*/chrome-linux/chrome

```

Consequently, `google-chrome --version` returned:

```plaintext
No Chrome/Chromium found at expected location: /home/discourse/.cache/ms-playwright/chromium-*

```

Running the QUnit tests then failed during browser detection:

```plaintext
ArgumentError: Malformed version number string .
    from lib/chrome_installed_checker.rb:39

```

## Reproduction

1. Open a fresh Discourse Dev Container.
2. Run `pnpm install`.
3. Run `pnpm playwright-install`.
4. Run `google-chrome --version`.

**Expected:** The installed Chromium executable is located and its version is displayed.

**Actual:** The wrapper reports that no Chromium installation was found, despite Playwright having installed it successfully.

## Workaround

Creating a symlink resolved the path mismatch:

```bash
ln -s chrome-linux64 \
  /home/discourse/.cache/ms-playwright/chromium-1248/chrome-linux

```

The container also initially lacked the shared libraries required by Chromium. I installed these using:

```bash
pnpm exec playwright install-deps chromium

```

Afterwards, `google-chrome --version` correctly reported Chrome for Testing 156.0.8078.4.

The affected QUnit test suite subsequently completed successfully, with **63 tests passed and 0 failures**.

## Suggested improvement

Could `.devcontainer/scripts/chrome_wrapper` be updated to recognise both `chrome-linux/chrome` and `chrome-linux64/chrome` layouts?

It may also be worthwhile to improve the version parsing in `lib/chrome_installed_checker.rb`, so that invalid browser-version output produces a clearer diagnostic rather than an `ArgumentError`.
