ci(mac): pin Playwright <1.58 to dodge Node 24 pipeTransport JSON crash

Mac UI run 25487129268 failed at composer.wait_for() with:

  SyntaxError: Unexpected end of JSON input
      at JSON.parse (<anonymous>)
      at Immediate.<anonymous>
      ...playwright/driver/package/lib/server/pipeTransport.js:78:42
  Node.js v24.14.1

Playwright 1.59 ships a bundled Node 24 driver whose pipeTransport.js
calls JSON.parse on every line received from the Chromium child
process, including empty/truncated lines. On the macos-14 free runner
(slow disk + slow process spawn) the Chromium launch sometimes emits
an empty stdout line during init, and Node 24's stricter parser turns
that into a fatal SyntaxError that takes the whole driver down.

Pin to playwright>=1.55,<1.58 -- those versions ship a Node 22 driver
that tolerates the empty-line race. Linux uses 1.59 fine because the
ubuntu-latest runner is faster and doesn't hit the race; only Mac
needs the pin.
This commit is contained in:
Daniel Han 2026-05-07 09:23:23 +00:00
commit ebf6dd2c35

View file

@ -91,8 +91,13 @@ jobs:
# No --with-deps on Mac: that flag installs Linux apt packages.
# GitHub-hosted macos-14 ships the system frameworks Chromium
# needs already.
# Pin <1.58 because playwright 1.59 ships a Node 24 driver that
# crashes with 'SyntaxError: Unexpected end of JSON input' in
# pipeTransport.js when the Chromium child writes an empty line
# during launch on macos-14 free runners. 1.55-1.57 still ship
# a Node 22 driver and don't hit this race.
run: |
pip install 'playwright>=1.45'
pip install 'playwright>=1.55,<1.58'
python -m playwright install chromium
- name: Reset auth + boot Studio