Repository navigation
build: bump Node to 26.13.0 - #5653
Conversation
Move every Node pin (.nvmrc, docker/base/Dockerfile, all workflows) from 24.22.2 to 26.13.0 (LTS). npm stays at 11.21.1. Node >= 25 official Linux binaries link against libatomic, so the base image now installs libatomic1. FFmpeg installation for the versioned Playwright packages no longer lets `playwright install ffmpeg` extract the archive: playwright-core < 1.60 deadlocks in its yauzl-based extractor on Node 24.16-24.17 and Node >= 26 (microsoft/playwright#40724, nodejs/node#63487). The script now resolves the install location and mirror URLs with `install ffmpeg --dry-run`, downloads and unzips the archive itself via scripts/extract-zip-native.js (the same system `unzip` workaround already used for versioned browsers), and then lets Playwright validate the completed install. Covered by the updated scripts/install-playwright-ffmpeg.test.js. Drop the obsolete `esbuild-plugins-node-modules-polyfill` override (no longer needed to resolve esbuild) and allow esbuild's install script so `npm ci` stops warning about it. Verified locally on Node 26.13.0 / npm 11.21.1: npm ci, build, lint, `npm pack` (no warnings), base/chromium/multi images and the test suites in them, and a scaffolded SDK project against the packed tarball. Co-authored-by: Amp <[email protected]>
Unreachable mirrors leave the cache untouched, a corrupt archive never writes INSTALLATION_COMPLETE, and a later healthy run recovers from the partial directory. Co-authored-by: Amp <[email protected]>
|
No actionable comments were generated in the recent review. WalkthroughProject, workflow, and Docker configurations now use Node.js 26.13.0. The Docker image adds ChangesNode.js runtime and FFmpeg installation
Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Other Sequence Diagram(s)sequenceDiagram
participant Installer as FFmpeg installer
participant CLI as Playwright CLI
participant Mirrors as Archive mirrors
participant Extractor as ZIP extractor
Installer->>CLI: Request dry-run output
CLI-->>Installer: Return install directory and archive URLs
Installer->>Mirrors: Fetch archive URLs in order
Mirrors-->>Installer: Return archive
Installer->>Extractor: Extract archive
Installer->>CLI: Run install command to validate installation
Possibly related PRs
Suggested reviewers: Merge Risk:
|
The manual FFmpeg download replaced `playwright install ffmpeg`, which honoured HTTPS_PROXY and any PLAYWRIGHT_DOWNLOAD_HOST scheme. Parse the labelled dry-run URLs instead of https-only matches, reject unsupported schemes before fetching, and start the installer with --use-env-proxy in the Dockerfiles so proxied image builds still work. Co-authored-by: Amp <[email protected]>
`--use-env-proxy` only exists from Node 24.5, but the base image accepts any NODE_VERSION build-arg within the supported >= 24 range. The NODE_USE_ENV_PROXY=1 environment form is honoured from Node 24.0 and ignored by versions without it. Co-authored-by: Amp <[email protected]>
Review summaryStatus: head is Addressed from review
Rejected with evidence
Why the custom installer: |
The installer now re-runs itself under NODE_USE_ENV_PROXY=1 whenever a proxy variable is set, so direct invocations outside the Docker builds honour HTTP(S)_PROXY too, and the Dockerfiles no longer need to set it. Extraction only writes INSTALLATION_COMPLETE once an ffmpeg-<platform> executable is present, so an unexpected archive is never cached as installed. Mirror failures now log the underlying socket error. Co-authored-by: Amp <[email protected]>
A mirror that answers 200 with a corrupt or incomplete archive previously failed the build before any fallback mirror was tried, on every rebuild. Download, extraction and the executable check now run per mirror, so an unusable archive moves on to the next mirror the same way an HTTP error does, and the install directory is reset between attempts. Co-authored-by: Amp <[email protected]>
Each mirror previously got its own 600 s window, so a set of stalled mirrors could hold a build for a multiple of the timeout the installer had before. All attempts for one FFmpeg version now share a single deadline, keeping fallback within the same bound as before. Co-authored-by: Amp <[email protected]>
A mirror that keeps a connection open but delivers data slowly could consume the whole 600 s budget shared by the mirrors of one version, leaving the healthy fallbacks a zero timeout. Give up on a mirror after PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT (30 s by default) without data, the same rule Playwright's own downloader applies, while keeping the shared deadline as the upper bound. Co-authored-by: Amp <[email protected]>
## Why The `can accept insecure certs` test in the chromium, chrome and edge `content` specs navigated to `https://self-signed.badssl.com`. That host intermittently resets connections (`net::ERR_CONNECTION_RESET`), which turned into 500/408 responses and failed the `test-*` jobs on every retry attempt, independently of the code under test (seen on `main`'s release-please run on 2026-11-02 and on #5653 today). ## What - `src/shared/tests/self-signed-server.ts` starts a local HTTPS server whose certificate is generated at test time by `openssl` (already present in the base image and on macOS) into a temporary directory. The key and certificate are deleted when the server closes; nothing is committed to the repository. - The three specs navigate to that server instead of badssl.com, and now also assert that the same page is **rejected** (500) without `acceptInsecureCerts` before asserting it is accepted (200) with the flag and that the served content came through. Previously the test would have kept passing even if the flag had no effect. Test-only change; no production code is touched. ## Verification - `npx mocha --no-package --no-config --timeout 45000 build/routes/{chromium,chrome,edge}/tests/content.spec.js`: 46 passing on Node 24.21.0, with the three `can accept insecure certs` cases at ~1.7 s each. - No `browserless-self-signed-*` directories remain in the OS temp directory after the run. - `prettier --check` and `eslint` clean on the changed files; `tsc` builds. <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/browserless/browserless/pull/5656" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a> <!-- devin-review-badge-end --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Tests** * Expanded coverage across Chrome, Chromium, and Edge for HTTPS sites using self-signed certificates. Tests confirm that requests fail by default and succeed when insecure-certificate acceptance is enabled. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Amp <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [2.58.3](v2.58.2...v2.58.3) (2026-11-03) ### Bug Fixes * reset stale debugger localStorage settings when a valid token is provided ([#5585](#5585)) ([a517801](a517801)) ### Build System & Runtime * bump Node to 26.13.0 ([#5653](#5653)) ([d554620](d554620)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: browserless-actions-bot[bot] <186328842+browserless-actions-bot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
.nvmrc, Docker base default, six browser test matrices, and four CI/publishing/release workflows. npm stays at 11.21.1;engines.nodestays>=24.libatomic1to the base image: official Node ≥ 25 Linux binaries link against libatomic, and the base build fails without it (libatomic.so.1: cannot open shared object file).scripts/install-playwright-ffmpeg.jsto download and unzip each pinned Playwright package's FFmpeg archive itself. playwright-core < 1.60 deadlocks in its yauzl-based extractor on Node 24.16–24.17 and Node ≥ 26 ([Bug]:playwright installhangs in node v26 microsoft/playwright#40724, Node 24.16.0: extract-zip hangs extracting nodejs/node#63487; the stream change was reverted on 24.x but kept on 26). The script now runsinstall ffmpeg --dry-runto learn the install directory and ordered mirror URLs, fetches the archive, extracts it through the existingscripts/extract-zip-native.js(systemunzip, the same workaround asinstall-versioned-browsers.sh), writesINSTALLATION_COMPLETEonly after a verified extraction, then letsplaywright install ffmpegvalidate the finished install under a timeout. The published images bundle 1.60–1.64 and were not affected; SDK consumers that pin olderplaywrightVersionswere (the unmodified script hangs after the download completes until its own 600 s timeout kills it).esbuild-plugins-node-modules-polyfilloverride (its peer range already accepts the installed esbuild; lockfile byte-identical) and approve esbuild's install script sonpm cino longer warns.extract-zip-native.jscomment to describe the affected Node ranges.Validation
Using Node.js v26.13.0 and npm 11.20.0/11.21.1 (host/image), on an arm64 host with Docker:
npm ci(no install-script warnings),npm run build:dev,npm run lint, andnpx prettier --check .passed.node --test scripts/install-playwright-ffmpeg.test.js: 6 passed, including first-mirror fallback, no re-download on re-run, unreachable mirrors leaving the cache untouched, and a corrupt archive never being marked installed.npm pack --dry-run: 0 warnings.docker/basebuilt with the new script;docker/chromiumimage test suite: 580 passing, 0 failing;docker/multiimage test suite: 607 passing, 0 failing (run twice, before and after the FFmpeg script rewrite). In-imagenode -vis v26.13.0 andlddshows libatomic linked./chromium/screenshot,/pdf,/content,/function,/scrape,/sessions,/pressure,/docsall return 200.install ffmpeghangs after download; completes on 1.60 and on Node 24.18/25.0), and confirmed that with the completion marker presentinstall ffmpegexits in well under a second without extracting.Summary by CodeRabbit
Updates
Bug Fixes
Documentation