| id | 12 | |
|---|---|---|
| title | Run the Open5GS WebUI on Node.js 26 | |
| status | done | |
| where | test machine | |
| needs_human | false | |
| depends_on |
|
nodejs_major: 26 works: the WebUI builds, starts and logs in. Needed before Node.js 24's
end of life (2028-04-30).
- Found in task 009 (2026-11-22): with Node.js 26.13.1 the WebUI
(Open5GS v2.8.0) builds, then crashes at start:
buffer-equal-constant-time/index.js:37: TypeError: Cannot read properties of undefined (reading 'prototype')(SlowBuffer.prototype.equal). Newer Node.js removedSlowBuffer. The module comes in viajsonwebtoken→jws→jwa. verify.ymlcatches it (the WebUI URL doesn't answer), butsite.ymldoesn't: systemd restarts the service forever.
- Check whether a newer Open5GS release has updated the WebUI's dependencies. If it has,
moving
open5gs_versionmight be all that's needed. - Otherwise, try an npm
overridesentry forjwa(a version that doesn't needbuffer-equal-constant-time), applied as a patch in the WebUI build. - Test on a container with Node.js 24 with
tests/lxd/upgrade-smoke.sh 22.04 webui 26(docs/testing.md#upgrade-test), then the full matrix.
- The WebUI starts on Node.js 26, and
upgrade-smoke.sh … stateshowslogin=PASS. - The matrix passes on all releases with
nodejs_major: 26.
Upstream: no Open5GS release after v2.8.0. The WebUI commits on main since then don't touch
dependencies. Two of them are access-control fixes, now task 015.
npm: every jwa release still lists buffer-equal-constant-time, which has had no release
since 1.0.1 (2013). But jwa 1.4.2 and 2.0.1 (2025-05-07) only require it when
crypto.timingSafeEqual is missing, which it never is on Node.js 6.6+. WebUI v2.8.0's lockfile
has jwa 1.4.1, the last version that loads it at startup. jws 3.2.2 asks for jwa ^1.4.1,
and jwa is the only package that needs buffer-equal-constant-time.
Changes:
open5gs_webui_npm_overrides: {jwa: "1.4.2"}(group_vars). Beforenpm clean-install, the build runsnpm pkg set overrides.jwa=1.4.2andnpm install --package-lock-only --ignore-scripts, which re-resolves the lockfile from metadata only.- The build stamp carries the overrides (
open5gs 2.8.0 node 26 jwa@1.4.2), so a box rebuilds once when they change. - New handler "WebUI answers after the restart":
site.ymlnow fails when the WebUI doesn't answer on/api/auth/csrfwithin 60 s, instead of passing while systemd restarts it forever. nodejs_major: 26(supported until 2029-04-30, a year longer than 24). Docs updated: upgrades.md, configuration.md, ubuntu-releases.md, testing.md.upgrade-smoke.sh stateprints the installedjwaversion(s).
Test on the 24.04 container (upgrade-smoke.sh 24.04 webui 26, from Node.js 24):
| Before | After | |
|---|---|---|
| Node.js | 24.22.3 | 26.13.1 |
WebUI jwa |
1.4.1 | 1.4.2 (the only copy) |
| Stamp | open5gs 2.8.0 node 24 |
open5gs 2.8.0 node 26 jwa@1.4.2 |
| Data | accounts=1 subscribers=1 sha256=e345d5edf3e57094 | the same |
| WebUI login + subscriber list via its API | PASS | PASS |
| WebUI restarts since start | 0 |
changed=10, 134 s. The new handler needed one retry while the WebUI started.
- The old build crash-loops for about a minute during the move. As soon as apt installed
Node.js 26, the old WebUI was restarted (01:01:08; most likely
needrestart). The old build, withjwa1.4.1, then crashed every 3 s with theSlowBuffererror until the rebuild replaced it (01:02:25). After that it logged only a MongoDB driver deprecation warning (collection.ensureIndex). This happens once, on the move off an unpinned build, and the WebUI is down during a rebuild anyway. Noted in upgrades.md. - Read-only preview on the reference Obcell with this branch:
changed=4, all for the move: NodeSourcenode_24.x→node_26.x, Node.js 24.22.3 → 26.x, the WebUI rebuild (open5gs 2.8.0 node 24→open5gs 2.8.0 node 26 jwa@1.4.2), and the stamp. - Seen in passing: on the reference Obcell,
~/.npmbelongs to root (5926 files, all from 2026-11-18, before the automation existed). Playbook builds use/root/.npm, so it doesn't come from the role.
Matrix at 14bf95f (nodejs_major: 26; 24.04 already moved by the test above, 26.04 moved
from Node.js 24 by the matrix run itself, 22.04 fresh):
| Release | ansible-core | Install | Health | Idempotent | NG Setup | UE end-to-end | Minutes |
|---|---|---|---|---|---|---|---|
| 22.04 (fresh) | 2.17.14 (inside) | PASS | PASS | PASS | PASS | PASS | 49 |
| 24.04 (existing) | 2.20.11 (inside) | PASS | PASS | PASS | PASS | PASS | 15 |
| 26.04 (existing, Node.js 24 → 26) | 2.20.11 (inside) | PASS | PASS | PASS | PASS | PASS | 15 |
Afterwards, upgrade-smoke.sh <release> state on all three: Node.js 26.13.1, jwa 1.4.2,
stamp open5gs 2.8.0 node 26 jwa@1.4.2, login=PASS, 0 WebUI restarts. The test machine now
holds the 22.04, 24.04 and 26.04 containers.
The reference Obcell is still on Node.js 24. Moving it is a site.yml run (about 3 minutes
of WebUI rebuild) with the owner's OK; the preview is above.
2026-11-24: the reference Obcell runs Node.js 26.13.1, moved together with the task 015 patches (findings there).