From 3a814ffe30be00df3615d8f0af9c33f0f28194c1 Mon Sep 17 00:00:00 2001 From: Misha Kolesnik Date: Sat, 7 Nov 2026 01:51:27 +0000 Subject: [PATCH] fix(browser): settle Playwright actions without page JavaScript Pin playwright and playwright-core to 1.65.0 inside the bundled CLI tree so both the CLI and MCP child use the Node-side settle timer. Keep the CLI at 0.1.23 and enforce the core pin alongside the existing version drift check. ## Release notes Fixed browser actions hanging when page JavaScript is blocked. The bundled driver now uses Playwright 1.65.0 for evaluation and clicks. Recreate your container with the updated image to use the fix. --- ops/docker/Dockerfile | 5 +++++ packages/browser/versions.env | 1 + packages/cuttle/internal/fingerprint/versions_pin_test.go | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/ops/docker/Dockerfile b/ops/docker/Dockerfile index 757d62e1..92844ac1 100644 --- a/ops/docker/Dockerfile +++ b/ops/docker/Dockerfile @@ -90,11 +90,16 @@ FROM selkies-${TARGETARCH} AS selkies # a Go test fails if the two drift. FROM node:22-trixie-slim AS driver ARG PLAYWRIGHT_CLI_VERSION=0.1.23 +ARG PLAYWRIGHT_CORE_VERSION=1.65.0 # No playwright browser is ever downloaded, here or at runtime: the only browser # is our stealth-Chromium, which the driver reaches over CDP. ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 NO_UPDATE_NOTIFIER=1 +# Replace the CLI's prerelease dependency until it ships the Node-side settle wait. +# Install in its own tree so both the CLI and the MCP child resolve the fixed core. RUN npm install -g --prefix=/opt/playwright-cli \ @playwright/cli@${PLAYWRIGHT_CLI_VERSION} \ + && npm install --prefix=/opt/playwright-cli/lib/node_modules/@playwright/cli --save-exact --omit=dev \ + playwright@${PLAYWRIGHT_CORE_VERSION} playwright-core@${PLAYWRIGHT_CORE_VERSION} \ && npm cache clean --force \ && /opt/playwright-cli/bin/playwright-cli --version \ && test -f /opt/playwright-cli/lib/node_modules/@playwright/cli/node_modules/playwright/cli.js diff --git a/packages/browser/versions.env b/packages/browser/versions.env index 4b661f06..027779a2 100644 --- a/packages/browser/versions.env +++ b/packages/browser/versions.env @@ -23,6 +23,7 @@ BROWSER_SHA256_ARM64=1ba199ffac7c3a69c5af033e9ea047e38c42411415a38d5e4782695e92a # shas above it is a duplicated literal there (a Dockerfile ARG cannot read this # file); a Go test fails if the two drift. PLAYWRIGHT_CLI_VERSION=0.1.23 +PLAYWRIGHT_CORE_VERSION=1.65.0 # sccache cache cap on the mounted volume (both targets' worth). SCCACHE_CACHE_SIZE=150G diff --git a/packages/cuttle/internal/fingerprint/versions_pin_test.go b/packages/cuttle/internal/fingerprint/versions_pin_test.go index 777e627b..5566e117 100644 --- a/packages/cuttle/internal/fingerprint/versions_pin_test.go +++ b/packages/cuttle/internal/fingerprint/versions_pin_test.go @@ -305,6 +305,11 @@ func TestBundledPlaywrightCLIPin(t *testing.T) { if m[1] != want { t.Errorf("Dockerfile ARG PLAYWRIGHT_CLI_VERSION=%s but versions.env PLAYWRIGHT_CLI_VERSION=%s", m[1], want) } + core := versionsEnvValue(t, "PLAYWRIGHT_CORE_VERSION") + m = regexp.MustCompile(`ARG PLAYWRIGHT_CORE_VERSION=(\S+)`).FindStringSubmatch(string(dockerfile)) + if core == "" || m == nil || m[1] != core { + t.Errorf("Dockerfile PLAYWRIGHT_CORE_VERSION must match versions.env %q", core) + } if cli.BundledPlaywrightCLIVersion != want { t.Errorf("cli.BundledPlaywrightCLIVersion=%s but versions.env PLAYWRIGHT_CLI_VERSION=%s - the "+ "briefing would name a driver version the image does not bundle",