Skip to content

fix: pin Node to 24.18.1 to avoid a Node 24.19+ native-addon crash - #283

Open
panish16 wants to merge 1 commit into
mainfrom
fix/pin-node-24.18.1
Open

panish16 wants to merge 1 commit into
mainfrom
fix/pin-node-24.18.1

Conversation

@panish16

@panish16 panish16 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the intermittent crash both #281 and #282 hit ("Assertion failed: (env) != nullptr", core dumped, exit 134) during nuxt generate - both in CI's verify-build and in the Cloud Build CD image.

Root cause

Not flakiness in this repo - it's an open Node.js core regression: nodejs/node#65446

node::ObjectWrap cleanup hooks were backported to the 24.x line without their registry, so any native addon using ObjectWrap (which better-sqlite3 does, even at the 12.11.1 version #281 already switched to) aborts deterministically under GC pressure on Node >=24.19.0. #281's version bump reduced how often it happened but couldn't fix it, since the bug is in Node itself, not the dependency.

Both ci.yml and cd.yml set node_version: "24", which resolves to whatever the latest 24.x patch is at build time - explaining why the exact same commit/dependencies passed on some runs and crashed on others.

Fix

Pin to 24.18.1, the last version confirmed unaffected in the upstream report. Removes the crash at the source instead of retrying past it.

Does not touch bcgov/bcregistry-sre's shared workflow default (still "24") - every app using that shared CI/CD is exposed to the same bug, but changing the shared default affects all of them and is a bigger call than this PR. Flagging separately.

Verified

  • verify-build (24.18.1, 11.9.0) - passes on this branch.
  • Real CD run (dev target): Node version: v24.18.1, no crash, "Deploy complete" to https://yfthig-dev.web.app.

The intermittent 'Assertion failed: (env) != nullptr' / core-dumped
crash hitting nuxt generate (both in CI's verify-build and in the
Cloud Build CD image) isn't flakiness in this repo's own code - it's
an open Node.js core regression: node::ObjectWrap cleanup hooks were
backported to the 24.x line without their registry, so any native
addon using ObjectWrap (which better-sqlite3 does, even at the
12.11.1 override from #281) aborts deterministically under GC
pressure on Node >=24.19.0.

nodejs/node#65446

Both ci.yml and cd.yml floated on node_version: "24", which resolves
to whatever the latest 24.x patch is at build time - explaining why
this passed some runs and crashed others with identical dependency
versions. Pinning to 24.18.1, the last version confirmed unaffected
in the upstream report, removes the crash at the source rather than
retrying past it.

Does not touch bcgov/bcregistry-sre's shared default (still "24") -
scoped to this repo's own pin. Every other app using the same shared
CI/CD is exposed to the same bug and would benefit from the same fix,
but changing the shared default affects all of them and is a bigger
call than this PR.

This branch was successfully deployed

1 active deployment
dev — b38fc375 Deployed Sep 25, 2026 by panish16 via bcregistry-ui-cd / deploy #290
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.

1 participant