Skip to content

Playwright fix, findings, 2026-06-10

Worker result for playwright-fix-brief-2026-06-10. Status: fixed and verified end-to-end.

Root cause

Not AVX2. Console's CPU reports avx2 in /proc/cpuinfo and the Playwright driver node binary (v24.13.0) runs fine. The Connection closed while reading from the driver error was the driver's Node process dying at startup with MODULE_NOT_FOUND: ./server/utils/httpServer.

The ~/.forge-venvs/assets/ venv was partially destroyed: module trees were missing while dist-info directories survived. pip itself was gone (No module named 'pip'), and playwright/driver/package/lib/ was missing files. ensurepip refused to repair because pip's dist-info made it look installed. Likely an interrupted upgrade or partial deletion; exact trigger unrecoverable.

Fixes applied

  1. Venv rebuilt (not committed, documented here): old venv moved to ~/.forge-venvs/assets.corrupt-2026-06-10, fresh python3.12 -m venv, installed playwright==1.58.0 pillow gallery-dl requests, then playwright install chromium (build 1208). Delete the .corrupt copy whenever.
  2. scripts/forge_assets_{search,grab}.py import path (commit 3332ec2): both inserted scripts/ on sys.path but lib/provenance.py lives at scripts/assets/lib/ since the flat-layout move. Imports were broken independently of Playwright.
  3. Full Chromium channel: all three Playwright consumers now launch with channel="chromium". The default headless shell plus the stale spoofed Chrome/124 UA trips engine bot detection (DDG served an error page, 0 candidates). Full Chromium with its native UA passes.
  4. Default search engine google to bing: google and ddg currently serve anti-bot walls to headless scrapes (DDG escalates to an anomaly/CAPTCHA page on repeated hits). Bing works.

Verification

  • forge_sites_screenshot.sh http://127.0.0.1:8096/: desktop + mobile PNGs written to logs/site-screenshots/ (ran twice, before and after channel change).
  • forge_assets_run.sh search "blue mountain landscape" --engine bing --count 5: 5 files + provenance saved to /mnt/workspace/Assets/Web-Grabs/.
  • /browser stream venv (~/.forge-venvs/browser, playwright 1.59.0) checked: healthy, untouched.

Consumer inventory

Consumer Venv State
forge_sites_screenshot.sh (/screenshot) assets fixed, verified
forge_assets_search.py / forge_assets_grab.py (asset-grabber) assets fixed, verified (bing)
/browser stream browser was never broken

Open edges

  • google/ddg scrape engines remain blocked by engine-side anti-bot; not pursuing evasion. Use bing or the keyed API engines (unsplash, pexels, need UNSPLASH_ACCESS_KEY / PEXELS_API_KEY).
  • No bootstrap script or requirements file exists for ~/.forge-venvs/assets; package set is recorded above if it corrupts again.

[playwright-fix worker, 2026-06-10]