Skip to content

build: bump Node to 26.13.0 - #5653

Merged
ahmedAmien merged 8 commits into
mainfrom
build/node-26.13.0
Nov 3, 2026
Merged

ahmedAmien merged 8 commits into
mainfrom
build/node-26.13.0

Conversation

@artiom

@artiom artiom commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Update Node.js from v24.22.2 to v26.13.0 (LTS), following build: bump Node to 24.22.2 and refresh Ubuntu images #5645 and build: bump Node to 24.22.1 #5631.
  • Align the same 12 pins: .nvmrc, Docker base default, six browser test matrices, and four CI/publishing/release workflows. npm stays at 11.21.1; engines.node stays >=24.
  • Add libatomic1 to 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).
  • Rewrite scripts/install-playwright-ffmpeg.js to 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 install hangs 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 runs install ffmpeg --dry-run to learn the install directory and ordered mirror URLs, fetches the archive, extracts it through the existing scripts/extract-zip-native.js (system unzip, the same workaround as install-versioned-browsers.sh), writes INSTALLATION_COMPLETE only after a verified extraction, then lets playwright install ffmpeg validate the finished install under a timeout. The published images bundle 1.60–1.64 and were not affected; SDK consumers that pin older playwrightVersions were (the unmodified script hangs after the download completes until its own 600 s timeout kills it).
  • Drop the obsolete esbuild-plugins-node-modules-polyfill override (its peer range already accepts the installed esbuild; lockfile byte-identical) and approve esbuild's install script so npm ci no longer warns.
  • Update the extract-zip-native.js comment 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, and npx 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/base built with the new script; docker/chromium image test suite: 580 passing, 0 failing; docker/multi image test suite: 607 passing, 0 failing (run twice, before and after the FFmpeg script rewrite). In-image node -v is v26.13.0 and ldd shows libatomic linked.
  • SDK smoke test against the packed tarball inside the multi image: scaffolded project builds and starts; a custom route, Playwright WebSocket connections to chromium/firefox/webkit, puppeteer-core WebSocket connect, and /chromium/screenshot, /pdf, /content, /function, /scrape, /sessions, /pressure, /docs all return 200.
  • Reproduced the extraction deadlock under Node 26.13.0 with playwright-core 1.59 (install ffmpeg hangs after download; completes on 1.60 and on Node 24.18/25.0), and confirmed that with the completion marker present install ffmpeg exits in well under a second without extracting.
  • Not covered locally: amd64 builds and the chrome/edge images (amd64-only); CI on this PR is the amd64 evidence.

Summary by CodeRabbit

  • Updates

    • Updated the project’s Node.js version to 26.13.0 across development, browser testing, Docker builds, and publishing.
    • Updated the base Docker image to support Node.js 26.13.0.
  • Bug Fixes

    • Improved Playwright FFmpeg installation reliability with proxy support, download mirror fallback, and recovery from incomplete downloads.
  • Documentation

    • Clarified which Node.js versions are affected by the stream-close issue and when it was reverted on the 24.x line.

Devin Review

artiom and others added 2 commits November 2, 2026 23:47
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]>
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

Project, workflow, and Docker configurations now use Node.js 26.13.0. The Docker image adds libatomic1. The FFmpeg installer processes Playwright dry-run metadata, downloads and extracts archives with mirror fallback, and validates installations. Package configuration and installer tests also changed.

Changes

Node.js runtime and FFmpeg installation

Layer / File(s) Summary
Node.js runtime configuration
.nvmrc, docker/base/Dockerfile, .github/workflows/docker-*.yml, .github/workflows/leak-check.yml, .github/workflows/lint.yml, .github/workflows/npm-publish.yml, .github/workflows/release-please.yml, package.json, scripts/extract-zip-native.js
Project settings, Docker, and workflows now specify Node.js 26.13.0. The Docker image adds libatomic1. package.json enables esbuild scripts and removes its override. A comment updates the documented Node.js versions associated with the stream-close issue.
FFmpeg download and installation flow
scripts/install-playwright-ffmpeg.js
The installer reads Playwright’s install directory and mirror URLs, downloads and extracts archives, writes a completion marker, and runs Playwright validation.
FFmpeg installation validation
scripts/install-playwright-ffmpeg.test.js
Tests cover mirror fallback, cache reuse, invalid and incomplete archives, recovery, stalled responses, and proxy failures.

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
Loading

Possibly related PRs

Suggested reviewers: andymrtnzp

Merge Risk: Moderate · up to ae3a8

A slow, continuously responding mirror can still cause FFmpeg installation to fail despite an available fallback. Bound each mirror’s attempt before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary Node.js version update across the workflows, Docker configuration, and project defaults.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

A rabbit checks the mirrored stream,
While Node hops up a version beam.
The archives land, then tests take flight,
Cache markers show the path is right.
The rabbit thumps: “All builds look bright!”

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 9000d825-53a7-4fc2-bbdd-d4fb6185ed34
Commits

Reviewing files that changed from the base of the PR and between e047001 and ae3a8ed.

Files selected for processing: 2
  • scripts/install-playwright-ffmpeg.js
  • scripts/install-playwright-ffmpeg.test.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

coderabbitai[bot]

This comment was marked as resolved.

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]>
coderabbitai[bot]

This comment was marked as resolved.

`--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]>
@artiom
artiom marked this pull request as ready for review November 3, 2026 00:29
@artiom

artiom commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Review summary

Status: head is ae3a8ed7; all review threads resolved; CI (lint, prettier, CodeQL, leak-check, test-chrome/chromium/edge/firefox/webkit/multi on v26.13.0) green through e047001, running on ae3a8ed7; mergeable against main.

Addressed from review

  • parseDryRun now reads the labelled Download url: / Download fallback N: lines and accepts plain http:// mirrors (PLAYWRIGHT_DOWNLOAD_HOST may be HTTP); non-http(s) schemes are rejected before any fetch. Covered by scripts/install-playwright-ffmpeg.test.js.
  • Proxy support no longer depends on how the installer is launched: when any HTTP(S)_PROXY/http(s)_proxy variable is set, the script re-executes itself with NODE_USE_ENV_PROXY=1, so the Dockerfiles call node scripts/install-playwright-ffmpeg.js exactly as main does and the proxy is honoured on Node 24.0–24.4 too. Verified on 24.21.0 and 26.13.0: a dead proxy makes all three mirrors fail through the proxy; a local proxy stand-in receives the request.
  • INSTALLATION_COMPLETE is only written when the archive actually contained an ffmpeg* entry, so a license-only or empty zip fails the build instead of marking FFmpeg installed. Covered by a test.
  • A mirror answering 200 with a corrupt or incomplete archive no longer blocks the build: download, extraction and the executable check run per mirror, so the next mirror is tried and the install directory is reset between attempts. Covered by a test where the first mirror serves a non-zip body and then a license-only zip.
  • All mirrors share one fixed 600 s download deadline, so a slow mirror cannot multiply the build time by the mirror count. Covered by a test.
  • A mirror that stops sending data is abandoned after PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT ms (default 30 s, matching Playwright's downloader) and the next mirror is tried, so a stalled mirror no longer eats the shared deadline. Covered by a test.
  • Mirror failures log the underlying cause (error.cause.message) rather than only fetch failed.

Rejected with evidence

  • Explicit chmod on the extracted binaries: the Playwright FFmpeg zips carry Unix mode bits and the native unzip restores them (-rwxr-xr-x, ffmpeg -version runs in the rebuilt base image).
  • A Playwright-style install lock: the installer runs in a single build step and its only callers are the two Dockerfile RUN lines.
  • Requiring the exact platform executable name (ffmpeg-linux): the installer validates through Playwright afterwards, which fails the build if the expected executable is missing, so a prefix check plus validation covers it without duplicating Playwright's platform table.

Why the custom installer: playwright-core < 1.60 deadlocks while extracting FFmpeg on Node ≥ 26, so the Docker build downloads from the official mirrors, extracts natively, writes INSTALLATION_COMPLETE, and then validates via Playwright.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Devin Review

Comment thread scripts/install-playwright-ffmpeg.js Resolved
Comment thread scripts/install-playwright-ffmpeg.js Resolved
Comment thread scripts/install-playwright-ffmpeg.js Resolved
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]>

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread scripts/install-playwright-ffmpeg.js Resolved
Comment thread scripts/install-playwright-ffmpeg.js Resolved
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]>

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread scripts/install-playwright-ffmpeg.js Resolved
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]>

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread scripts/install-playwright-ffmpeg.js Resolved
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]>
ahmedAmien pushed a commit that referenced this pull request Nov 3, 2026
## 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]>
@ahmedAmien
ahmedAmien merged commit d554620 into main Nov 3, 2026
23 of 24 checks passed
@ahmedAmien
ahmedAmien deleted the build/node-26.13.0 branch November 3, 2026 11:55
artiom pushed a commit that referenced this pull request Nov 3, 2026
🤖 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants