CI: E2E tests consistently fail on macos-latest — Electron fails to install

Author: Aditya2073Created Jun 22, 2026Updated Jun 22, 2026

Description

The Test workflow consistently fails on macos-latest at the E2E Tests step. All E2E tests fail with the same error:

Error: electron.launch: Electron failed to install correctly, please delete node_modules/electron and try installing again

   at ../fixtures/electron-app.ts:37

  35 |         env.E2E_HEADLESS = 'true';
  36 |       }
> 37 |       const electronApp = await _electron.launch({
     |                           ^
  38 |         args: [path.join(__dirname, '../../release/app')],
  39 |         env,
  40 |       });

Impact

10/10 of the most recent Test workflow runs have failed with this same error:

Run Branch Result
#27974458488 fix-999-window-resize-on-refresh
#27769203392 add-device-manager-unit-tests
#27768870350 add-device-manager-unit-tests
#27768302390 add-device-manager-unit-tests
#27767673332 add-device-manager-unit-tests
#27767112033 add-device-manager-unit-tests
#27404054359 fix/vision-dropdown-scrollable
#27403203791 fix/flex-layout-last-device-cutoff
#27402765278 add-device-manager-unit-tests
#26862948665 feature/custom-device-resizer

All PRs are affected — this is not specific to any branch.

Environment

  • Runner: macos-latest (only OS in the matrix)
  • Electron: 40.6.1
  • Playwright: 1.58.2
  • Node: 24

Steps That Succeed

All steps before E2E Tests pass fine:

  • yarn install — installs successfully
  • yarn build — builds successfully
  • yarn lint + yarn exec tsc + yarn test — all pass

Only the E2E Tests step (yarn test:e2e) fails.

Possible Causes

  1. Electron 40.x binary issue on macOS runner — The Electron binary may be incompatible with or corrupted on the macos-latest GitHub Actions runner image
  2. Playwright _electron.launch() incompatibility — Playwright's Electron support may not properly locate or validate the Electron 40 binary
  3. Caching issue — A corrupted Electron binary could be cached between runs

Suggested Fixes

  • Try adding macos-14 or macos-13 as an alternative runner
  • Check if Electron 40.x has known issues on ARM64 macOS runners
  • Consider pinning Electron to a version known to work with Playwright's _electron.launch()
  • Add rm -rf node_modules/electron before yarn install to rule out caching issues

Source: responsively-org/responsively-app