Repository navigation
Description
TL;DR: One bad line in a source map can kill REA. The line names a Windows share with a bad server name. Node 22.19 to 22.22, 24.11 to 24.15 and 26.0 abort on it. REA's engines field still allows those builds. I hit it on Node 22.22.2. Node 24.18.0 is fine.
Before submitting
- I searched the open and closed issues for a related report.
- I removed credentials, tokens, private paths, and sensitive target data.
Area
Evidence, artifacts, or reconstruction
Observed behavior
rea analyze-javascript-application aborts the whole Node process. It does not return an error.
The trigger is a source map whose sources entry is a UNC path with an invalid host, such as \\bad host\share\a.js. REA passes it to pathToFileURL(path, { windows: true }). On affected Node builds, Node fails a native assertion and calls abort(). The TypeError catch in windowsFileUrl never runs.
The repo's own test hits this too. On Node 22.22.2, npm test on main (5291bca1) passes 6230 tests and still exits 1. The \\bad host\share\a.js row of "declines source references without a trustworthy file path" in tests/boundary/filesystem/sourceToBundlePaths.test.ts kills its Vitest fork worker with SIGABRT.
Reproduction
- Make a folder
app/maps.js/with one file,main.js.map:{"version":3,"file":"main.js","sources":["\\\\bad host\\share\\a.js"],"names":[],"mappings":"AAAA"} - Run
rea analyze-javascript-application ./app --format jsonon Node 22.22.2 (REA 6.2.0 from npm). - It prints progress up to "Parsing and projecting maps.js/main.js.map". Then it aborts with exit code 134 and no JSON.
- The same run on Node 24.18.0 exits 0 and returns the analysis Evidence.
The same crash in plain Node, no REA needed:
node -e 'require("node:url").pathToFileURL("\\\\bad host\\share\\a.js", { windows: true })'On Node 24.18.0 that line throws ERR_INVALID_URL instead. A plain host (\\host\share\a.js) works on both, and the same string with { windows: false } returns an ordinary file URL on both.
Expected behavior
The source reference resolves as unresolved, the way the test expects. The analysis finishes and the process stays up. npm test passes on every Node version engines admits.
Impact and scope
- Affected Node builds: 22.19.0 to 22.22.x, 24.11.0 to 24.15.x, and 26.0.0. Node fixed the crash in 22.23.0, 24.16.0 and 26.1.0 (Passing malformed UNC hostname to pathToFileURL() crashes the process nodejs/node#62546, fix in url: process crash via malformed UNC hostname in pathToFileURL() nodejs/node#62574, merged 2026-04-30). I read
src/node_url.ccat the tags: 22.22.2, 24.11.0, 24.15.0 and 26.0.0 haveCHECK(out->set_hostname(hostname.ToStringView()))at line 171; 22.23.0, 24.16.0 and 26.1.0 replace it withif (!out->set_hostname(...)) return ThrowInvalidURL(...). - REA's
enginesfield still allows all of those builds:^22.19.0 || ^24.11.0 || >=26.0.0. - One bad source map in an analyzed app takes down the CLI run. The MCP server shares the code path, so I'd expect it to go down the same way. I did not test MCP.
- Not affected: 22.23.0+, 24.16.0+ and 26.1.0+, going by the Node fix. I ran 22.22.2, 22.23.1 and 24.18.0. On 22.23.1 the same CLI repro exits 0. The reference comes back
unresolved, with the reason "Source reference is not a valid URL or filesystem path."
REA version
6.2.0 from npm for the CLI runs. main at 5291bca1 for the test suite.
Runtime and platform
Node 22.22.2 (a leftover Fedora 43 nodejs build) with npm 10.9.7; Node 24.18.0 with npm 11.16.0 as the control. Nobara 44 (Fedora 44 base), Linux x86-64.
Target and artifact context
A folder with one source map. No real app needed.
Interface
CLI
Earliest failure stage
Artifact or evidence registration
Relevant output or evidence
The abort, identical from the CLI, the Vitest worker and plain Node on 22.22.2:
# node[1912785]: static void node::url::BindingData::PathToFileURL(const v8::FunctionCallbackInfo<v8::Value>&) at ../../src/node_url.cc:171
# Assertion failed: out->set_hostname(hostname.ToStringView())
----- Native stack trace -----
1: 0x7fba2d427767 node::Assert(node::AssertionInfo const&) [/lib64/libnode.so.127]
npm test on Node 22.22.2, main 5291bca1:
Error: Worker exited unexpectedly with signal SIGABRT during started state while running test file tests/boundary/filesystem/sourceToBundlePaths.test.ts
Test Files 691 passed | 11 skipped (703)
Tests 6230 passed | 89 skipped (6325)
Errors 1 error
Duration 566.42s
On Node 24.18.0 with npm 11.16.0, same commit, npm run test:focused -- tests/boundary/filesystem/sourceToBundlePaths.test.ts passes all 53 tests in about 2 s, and the full npm test is green:
Test Files 692 passed | 11 skipped (703)
Tests 6236 passed | 89 skipped (6325)
Duration 471.64s
Typed outcome or recovery expected
An unresolved result, with the reason REA already has for this case: "Source reference is not a valid URL or filesystem path." Not a process abort. For the test suite: a green run on every admitted Node version, or a version-gated skip that links the Node issue.
Analysis or suspected cause
This is from reading the source. It is not a tested fix.
- The call came in with fix(javascript): match source-map originals that name parent directories #1215 (
windowsFileUrlinsrc/domain/javascript/javascriptSourceMapPaths.ts). It wrapspathToFileURL(path, { windows: true })in atry/catchforTypeError. On affected Node builds the C++ binding asserts instead of throwing. The catch never runs and the process dies. - CI runs most jobs on
.nvmrc(24.18.0), which has the Node fix. The only Node 22.19.0 step inci.ymlruns three directory-identity tests. That would explain why CI stays green. - Two possible fixes. One: raise the
enginesfloor to^22.23.0 || ^24.16.0 || >=26.1.0. Two: check the UNC host before callingpathToFileURL, for example withURL.parseonfile://<host>/, and returnnullwhen it fails.
Additional context
Everything above was run on one Linux box with both Node builds side by side, same source map, same REA build.
🤖 Generated with Claude Code (Fable 5.1 and Opus 5.5) 🦊
Activity
CassieFox23 commentedon Oct 9, 2026
TL;DR: Confirmed fixed on main. Thanks, Yi-111-a and morluto.
I ran merged main (f504c2a). The
\\bad host\share\a.jsmap now resolves asunresolvedand the CLI exits 0. The U+00AD and U+200C hosts from the review do the same. A plain\\server\sharehost still resolves. The newsourceMapUncHoststest file passes here, 11 cases.Test setup
🤖 Generated with Claude Code (Fable 5.1) 🦊