Repository navigation
Description
Describe the bug
After upgrading to Vite+ 1.8.0 (Homebrew), every vp command fails during startup on a network where https://nodejs.org/dist/*/SHASUMS256.txt.asc returns 403 Forbidden (a corporate proxy that blocks .asc files).
1.8.0 added the PGP signature check for Node downloads (#1807), so the bootstrap now fetches SHASUMS256.txt.asc. When that request fails, the whole install is a hard error. There is no fallback to checksum-only verification, even though the docs say mirrors that don't publish an .asc fall back to checksum-only.
It also blocks the documented way out. vp env off (system-first mode) can't run either, because the CLI bootstraps its own Node runtime before it handles any command. My previous Vite+ home was already in system_first mode with a working system Node (v26.13.1), but the new 1.8.0 home has no config yet, so there is no way to switch it without first downloading Node.
Expected, in rough order of preference:
- If the
.asccan't be fetched (4xx or a network error), fall back to SHA-256-only verification with a warning, the same as for mirrors without an.asc. Or, at least, print an error that namesVP_NODE_SKIP_SIGNATURE_VERIFYandVP_NODE_DIST_MIRROR. - Let
vp env off/vp env onandvp --versionrun without bootstrapping a managed Node, or let the bootstrap use a suitable system Node when one is onPATH. - Carry over
config.json(shim mode) from the previous Vite+ home when the home directory moves on upgrade.
Reproduction
No repository needed; it depends only on the network. Any environment where https://nodejs.org/dist/v24.22.3/SHASUMS256.txt.asc returns 403 while the rest of nodejs.org/dist is reachable.
Steps to reproduce
- Be on a network or proxy that returns 403 for
https://nodejs.org/dist/*/SHASUMS256.txt.asc. brew upgrade voidzero-dev/vite-plus/vp(to 1.8.0).- Run
vp --version, orvp env off, in a project whoseengines.nodeis>=24.20.0.
System Info
macOS 26 (Darwin 25.6.0), Apple silicon
vp 1.8.0 (Homebrew)
System Node: v26.13.1 (Homebrew)
pnpm (packageManager field: pnpm@10.x)
Previous Vite+ home config: { "shimMode": "system_first" }Used Package Manager
pnpm
Logs
$ vp --version
info: installing vite-plus@1.8.0...
error: Setup error: Failed to install Node.js 24.22.3: Failed to download from https://nodejs.org/dist/v24.22.3/SHASUMS256.txt.asc: HTTP status client error (403 Forbidden) for url (https://nodejs.org/dist/v24.22.3/SHASUMS256.txt.asc)
$ vp env off
info: installing vite-plus@1.8.0...
info: Preparing Node.js and pnpm...
error: Setup error: Failed to install Node.js 24.22.3: Failed to download from https://nodejs.org/dist/v24.22.3/SHASUMS256.txt.asc: HTTP status client error (403 Forbidden) for url (https://nodejs.org/dist/v24.22.3/SHASUMS256.txt.asc)
Workarounds I found in the docs (env.md): VP_NODE_SKIP_SIGNATURE_VERIFY=1 or VP_NODE_DIST_MIRROR. Neither is mentioned in the error, and the first turns off a security check for an issue that could fall back safely.
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Effort
Target date
Start date
Activity
voidzero-bot commentedon Nov 29, 2026
SHASUMS256.txt.asc, and the documented escape hatches (VP_NODE_SKIP_SIGNATURE_VERIFY=1orVP_NODE_DIST_MIRROR) were verified to work end-to-end during the reproduction, so there is a straightforward way to unblock the install.I reproduced the exact failure by simulating the reporter's network (a fake
nodejs.orgHTTPS server returning 403 only forSHASUMS256.txt.asc) and a Homebrew-style install: bothvp --versionandvp env offhard-fail with the identicalSetup error: Failed to install Node.js 24.22.3: ... 403 Forbiddenmessage, with no checksum-only fallback. The root cause isresolve_shasums_content()incrates/vp_js_runtime/src/runtime.rs:152(Err(e) if signature.required => Err(e)):ShasumsSignature::requiredistruefor the officialnodejs.orghost (crates/vp_js_runtime/src/providers/node.rs:653), so any.ascfetch failure — 403, 404, or a network error — is fatal; the checksum-only fallback only applies to non-nodejs.orgmirrors.vp env offis additionally unreachable during the broken bootstrap because Homebrew self-setup (crates/vp_global_cli/src/main.rs:443) runs before command dispatch, and the recovery-bypass list inmain.rs:341-357includesenv doctorbut notenv on/env off.Verification concluded the hard error itself is intended behavior (per
rfcs/verify-node-shasums-signature.md— "A missing or invalid signature is a hard error" for the official host — plusdocs/guide/env.md, which documentsVP_NODE_SKIP_SIGNATURE_VERIFYfor blocked downloads, and tests pinning the semantics), so I made no code changes.I wasn't able to find a fix, but I identified some areas that may be relevant:
crates/vp_js_runtime/src/runtime.rs:129-158(resolve_shasums_content, where an actionable error namingVP_NODE_SKIP_SIGNATURE_VERIFY/VP_NODE_DIST_MIRRORcould be added — the code comments already anticipate "a signature-fetch failure" as the escape-hatch case),crates/vp_js_runtime/src/providers/node.rs:586-653(is_official_dist_host/required), andcrates/vp_global_cli/src/main.rs:341-357(is_homebrew_recovery_command, where adding the JS-payload-freeenv on/env offcommands would keep the escape hatch reachable while the bootstrap is broken). Whether to soften the hard error into a checksum-only fallback is a security trade-off that needs a maintainer decision against the RFC. A failing-test reproduction was not added.Full Triage Report
Triage report — issue #3613
Stage: reproduce
Result: REPRODUCED on current checkout (
vite-plus/vpv1.8.0, branchtriagebot/fix-3613)Issue type: Bug
Issue summary
After upgrading to Vite+ 1.8.0 (Homebrew), every
vpcommand fails during startup onnetworks where
https://nodejs.org/dist/*/SHASUMS256.txt.ascreturns 403 (corporateproxy blocking
.ascfiles). The Node bootstrap treats the.ascfetch failure as ahard error with no checksum-only fallback and no hint at the documented escape hatches
(
VP_NODE_SKIP_SIGNATURE_VERIFY,VP_NODE_DIST_MIRROR).vp env offcannot runeither, because the Homebrew self-setup bootstraps Node before dispatching any
command, so there is no way to switch the fresh home to system Node.
Expected (reporter's preference order): fall back to SHA-256-only verification with a
warning on
.ascfetch failure, and/or name the escape hatches in the error; allowvp env off/vp --versionto run without bootstrapping a managed Node.Actual: hard setup error on every command; no fallback; escape hatches not mentioned.
Environment
/home/runner/work/vite-plus/vite-plus, branchtriagebot/fix-3613,vpv1.8.0 (local-dev build installed by the workflow at~/.vite-plus)/tmp/vite-plus-triage/gh-3613(all logs, fixtures, fake server, homes)How the network condition was simulated
The report's trigger is a network/proxy condition (403 for
nodejs.org/dist/*/SHASUMS256.txt.ascwhile the rest of nodejs.org works). It was simulated without changing any vp code:
/etc/hostsentry127.0.0.1 nodejs.org(restored after the run) plus a local HTTPSserver on 127.0.0.1:443 presenting a cert for
nodejs.orgsigned by a test CAinstalled into the runner's system trust store (removed after the run).
Server:
$TRIAGE_DIR/fake-nodejs/server.py, fixtures under$TRIAGE_DIR/fake-nodejs/fixtures/dist/(real prefetched
index.json,SHASUMS256.txt,SHASUMS256.txt.asc,node-v24.22.3-linux-x64.tar.gz). Request log:$TRIAGE_DIR/fake-nodejs/server.log.A mode file switches
.ascresponses between 403 (block) and 200 (serve).pattern (
crates/vp_cli_snapshots/.../command_self_setup_external/homebrew.mjs):$TRIAGE_DIR/repro/brew-prefix/containingbin/vp(copy of the built global CLI)and
INSTALL_RECEIPT.json(
{"homebrew_version":"7.0.2","source":{"tap":"voidzero-dev/vite-plus","path":"/tap/HomebrewFormula/vp.rb"}}),which makes
vp_global_cli::homebrewclaim the binary so the self-setup("installing vite-plus@1.8.0..." → "Preparing Node.js and pnpm...") runs on every
invocation, exactly like the reporter's Homebrew install.
$TRIAGE_DIR/repro/project/package.jsonwith"engines": { "node": ">=24.20.0" }and"packageManager": "pnpm@10.15.0".VP_HOMEunder$TRIAGE_DIR/repro/andVP_SELF_SETUP_NO_MODIFY_PATH=1. The defaultVP_NODE_DIST_MIRRORwas unset, sodownloads go to
https://nodejs.org/dist(hostnodejs.org→ShasumsSignature::required = trueinvp_js_runtime).Commands attempted and results
1. Trigger: blocked
.asc,vp --version— REPRODUCEDIdentical shape to the reporter's log (same message, same version 24.22.3, same URL).
Server log shows the
.ascwas requested 4 times (1 + 3 backon retries indownload_text) and nothing else was fetched from nodejs.org — the bootstrap neverfalls back to the plain
SHASUMS256.txt, never attempts the archive, and the errormentions neither
VP_NODE_SKIP_SIGNATURE_VERIFYnorVP_NODE_DIST_MIRROR.Log:
$TRIAGE_DIR/repro/trigger-brew-version.log.2. Trigger: blocked
.asc,vp env off— REPRODUCEDConfirms the second half of the report: the documented way out (
vp env off) cannotrun because the Homebrew self-setup bootstraps Node before the command is dispatched,
and a fresh home has no saved config yet. Log:
$TRIAGE_DIR/repro/trigger-env-off.log.3. Control A: same command, real network — passes
Node.js v24.22.3 was downloaded, PGP-verified and installed into the fresh home
(
js_runtime/node/24.22.3/bin/node→v24.22.3). Rules out an unrelated failure inthe simulated Homebrew flow. Log:
$TRIAGE_DIR/repro/control-brew-version.log.4. Control B: same fake nodejs.org,
.ascserved (200) — passesWith the identical fake server/CA/hosts setup but mode
serve(real.asccontent),the same command succeeds (exit 0):
.asc→ 200 (signature verified), archive → 200(checksum verified), then
pnpm installfrom the real registry. Only the.ascresponse differs between this and the failing trigger, isolating the 403 on
SHASUMS256.txt.ascas the sole cause of the hard failure.Log:
$TRIAGE_DIR/repro/control-fake-serve.log.5. Workaround check:
VP_NODE_SKIP_SIGNATURE_VERIFY=1— passesThe documented escape hatch works (fetches plain
SHASUMS256.txt, verifies thearchive SHA-256, completes) but, as the reporter notes, the hard error never points
to it. Log:
$TRIAGE_DIR/repro/trigger-skip-sig.log.Result
Reproduced on current main: with
nodejs.orgreachable butSHASUMS256.txt.ascreturning 403, a fresh Homebrew-style install hard-fails onvp --versionandvp env offwithSetup error: Failed to install Node.js 24.22.3: ... 403 Forbidden ... SHASUMS256.txt.asc, with no checksum-only fallbackand no mention of the documented escape hatches. Controls on the real network and
with the
.ascserved succeed, isolating the blocked.ascas the cause.Diagnosis
Confidence: high — the failing logic is proven by code inspection and matches the
observed reproduction exactly (403 → hard error with the reported message; escape hatch
works; serving the
.ascsucceeds).Root cause 1 — primary: any
.ascfetch failure is fatal for the official hostcrates/vp_js_runtime/src/providers/node.rsis_official_dist_host()(lines 586-604) reduces the resolved dist base URL(
VP_NODE_DIST_MIRRORor the defaulthttps://nodejs.org/dist) to its host andcompares it literally to
nodejs.org.get_download_info()(line 653) setsShasumsSignature { required: is_official_dist_host(&base_url) }—
required = truefor the official host.crates/vp_js_runtime/src/runtime.rs,resolve_shasums_content()(lines 129-158):For
nodejs.org, any failure fetchingSHASUMS256.txt.asc— 403, 404, timeout,network error — propagates as
Error::DownloadFailedafterdownload_text's threebackon retries (
crates/vp_js_runtime/src/download.rs:262-277). The plainSHASUMS256.txtis never tried first, and the checksum-only fallback branch isreachable only when
required == false(non-nodejs.orgmirror hosts, musl buildswhere
signatureisNone).Error wrapping, which is why the message looks as it does:
crates/vp_js_runtime/src/error.rs:24—#[error("Failed to download from {url}: {reason}")] DownloadFailed.crates/vp_setup/src/install.rs:544-547—prepare_install_runtimewraps it asFailed to install Node.js {node_version}(DEFAULT_INSTALL_NODE_VERSION=.node-version=24.22.3).crates/vp_setup/src/error.rs:9-10—Error::SetupprefixesSetup error:.Why this is the intended-but-fragile design:
rfcs/verify-node-shasums-signature.mdintroduced
requiredper source: nodejs.org always publishes the.asc, so requiringit blocks a compromised-mirror/tampered-
SHASUMSattack; custom mirrors may publishonly the plain
SHASUMS256.txt, so there the fallback is checksum-only. The RFCconsidered the
.ascbeing absent on mirrors but not an intermediary blocking it onthe official host (403 by a corporate proxy) — the code cannot distinguish "not
published" from "blocked".
VP_NODE_SKIP_SIGNATURE_VERIFYwas explicitly designed asthe escape hatch for "a signature-fetch failure" (comment at
runtime.rs:135-137), butthe error text never names it, nor
VP_NODE_DIST_MIRROR.Root cause 2 — secondary:
vp env offcannot run because self-setup precedes dispatchcrates/vp_global_cli/src/main.rs:443-452—self_setup::maybe_run()runs beforeany command dispatch. For a Homebrew-owned binary, the early-exit marker check in
self_setup.rs:60-66is skipped, so the full first-start setup (which bootstrapsNode via
self_setup.rs:344-374→vp_setup::install::prepare_install_runtime)executes on every invocation until it succeeds.
is_homebrew_recovery_command()(main.rs:341-357), which allowsvp implode,vp upgrade, andvp env doctorto skip self-setup — it deliberatelyexcludes
--versionand does not includevp env on/vp env off.vp env offis a pure config + shim operation(
crates/vp_global_cli/src/commands/env/off.rs:21-39) that needs no Node at all, yetit is unreachable during a failed bootstrap — the reporter's "no way out".
vp env offworks without bootstrappingNode (verified in the reproduce step).
(
self_setup.rs:366-374passesNodeVersion::Preferred; theNodeVersion::Systempath exists only under
VP_ENV_FORBIDDEN=1), so asystem_firstpreference cannotprevent the download either.
Root cause 3 — tertiary: saved config not carried over when the home layout moved
The reporter's previous home stored
config.json(shim modesystem_first) in thesingle-root home (
~/.vite-plus). The XDG directory layout (d43c5f97d) moved theconfig to
<CONFIG>/config.json(crates/vp_pm_cli/src/user_config.rs:151-152), andno code migrates the legacy home's
config.jsoninto the new config root. The savedsystem_firstpreference was therefore silently dropped, which is why the user neededvp env offin the first place.Suggested fix approach (decision for fix stage)
a required-signature fetch failure but make it actionable — wrap the error in
resolve_shasums_content(or add a dedicated error variant) namingVP_NODE_SKIP_SIGNATURE_VERIFYandVP_NODE_DIST_MIRROR.like mirrors) re-opens part of the attack the RFC closed (an on-path attacker who
can 403 the
.asccould also tamper the plainSHASUMS256.txtand serve a matchingarchive). If chosen: restrict the fallback to transport/HTTP-status failures (never
to
verify_signed_shasumsfailures), warn loudly, and consider requiring theexplicit
VP_NODE_SKIP_SIGNATURE_VERIFYopt-in — this trade-off needs a maintainerdecision against
rfcs/verify-node-shasums-signature.md.vp env on/vp env offtois_homebrew_recovery_command()(main.rs:341-357) so system-first mode can beselected while the bootstrap is broken (command needs no Node; same precedent as
env doctor).NodeVersion::Systempath when the user selectssystem-first and a suitable system Node/pnpm are available (mirrors the
VP_ENV_FORBIDDENbehavior).config.jsonto the new config root on firstsetup so saved shim-mode preferences survive layout changes.
Edge cases
.asc) on the official host fails identically to 403; so do transientnetwork errors after the three retries.
VP_NODE_DIST_MIRRORwhose URL host is literallynodejs.org(e.g. a path-prefixedproxy) still yields
required = true— a mirror-style workaround must change thehost.
signature = None) and are unaffected.vp env doctor,vp implode, andvp upgradealready bypass self-setup onHomebrew and remain usable during a broken bootstrap.
Regression evidence
053fc9337(2026-06-23, "feat(runtime): verifyNode.js downloads with PGP signatures") — the commit that added
is_official_dist_host,ShasumsSignature::required, and theErr(e) if signature.required => Err(e)branch.v1.7.0(2026-11-17) andv1.8.0(2026-11-24).The reporter attributes the change to 1.8.0 (Verify SHASUMS.txt before installing Node #1807 RFC); they most likely upgraded
from a pre-1.7 line.
git log -S "signature.required"→only the rename refactor
d817a0db8).No instrumentation was added; the checkout worktree is clean.
Verification
Claim (observed behavior): On a network where
nodejs.org/dist/*/SHASUMS256.txt.ascreturns 403, a fresh Homebrew install of
vp1.8.0 hard-fails on every command(
vp --version,vp env off) withSetup error: Failed to install Node.js 24.22.3: Failed to download from https://nodejs.org/dist/v24.22.3/SHASUMS256.txt.asc: HTTP status client error (403 Forbidden). There is no automatic checksum-only fallbackand the error names neither
VP_NODE_SKIP_SIGNATURE_VERIFYnorVP_NODE_DIST_MIRROR;vp env offcannot run because self-setup precedes command dispatch.Claim (reporter expects): automatic SHA-256-only fallback on
.ascfetch failure(or at least an error naming the escape hatches);
vp env off/vp env on/vp --versionrunnable without bootstrapping a managed Node; config.json carriedover when the home moves.
Verdict: intended behavior (confidence: high)
Every headline behavior is documented, tested, and was introduced intentionally:
.asccannot be fetched — intended.rfcs/verify-node-shasums-signature.md(source-semantics section):"Official
nodejs.org…required = true. A missing or invalid signature is ahard error.
requiredis decided by the resolved host, not merely whether themirror env var is set." A 403 from an intermediary is a "missing" signature in this
model. The reporter's expectation 1 (automatic checksum-only fallback for the
official host) contradicts the RFC's explicit design decision; the checksum-only
fallback is deliberately reserved for custom-mirror hosts and musl builds
(
crates/vp_js_runtime/src/providers/node.rs:641-654, pinned by teststest_get_download_info_custom_mirror_signature_optionalandtest_get_download_info_official_mirror_requires_signature).docs/guide/env.md("Node.js Signature Verification"): "If a future keyring orcertificate issue blocks downloads, set
VP_NODE_SKIP_SIGNATURE_VERIFYtotemporarily bypass PGP verification" — the documented remedy for exactly this
situation, verified working in the reproduce stage (exit 0 with a loud warning).
docs/guide/global-cli.md"Network Hosts" listsVP_NODE_DIST_MIRRORas thenodejs.org override.
docs/guide/homebrew.md:22: "Setup uses the release's pinned Node.js and pnpmversions, even if you choose to prefer system tools."
docs/guide/global-cli.md:488: "The tap still prepares its pinned Node.js and pnpmto install CLI dependencies." This directly contradicts the reporter's expectation 2
for the first-run case; the intentional exception is
VP_ENV_FORBIDDEN=1.vp env offas a post-setup command — intended.docs/guide/global-cli.md:488: "After setup, usevp env offto change thispreference." The documented way to prefer system tools on first run is
VP_NODE_MANAGER=no VP_PM_MANAGER=no vp help(docs/guide/global-cli.md:482).The Homebrew recovery set that bypasses self-setup was deliberately enumerated in
PR feat: add official Homebrew tap #2740 (commit
8ea2f843d, testhomebrew_recovery_commands_do_not_require_the_js_payload):implode,upgrade,env doctor;--versionis explicitly excluded (!args.version).Verify SHASUMS.txt before installing Node #1807, designed in the RFC, implemented in PR feat(runtime): verify Node.js downloads with PGP signatures #1848 (commit
053fc9337), shippedin v1.7.0 and unchanged since. "A previous release without an intentional change"
does not apply.
vp_js_runtime/vp_global_cli/vp_setup— Vite+'s own code.Prior issues/PRs:
gh searchfound no earlier report of a proxy-blocked.asc;#1807 → #1848 is the feature lineage.
Caveats — unconsidered gaps, not contradictions of intent
The classification applies to the headline behavior. Some sub-items have no recorded
intent (neither docs, tests, nor comments) and remain reasonable UX-improvement
candidates for maintainers, potentially as a follow-up issue rather than a bug fix:
VP_NODE_SKIP_SIGNATURE_VERIFY/VP_NODE_DIST_MIRROR(the reporter's "at least")would match the escape-hatch intent already in code comments
(
crates/vp_js_runtime/src/runtime.rs:135-137explicitly anticipates"a signature-fetch failure" as the escape-hatch use case).
vp env on/vp env offare JS-payload-free commands (like the includedenv doctor) but are absent fromis_homebrew_recovery_command()(
crates/vp_global_cli/src/main.rs:341-357), so the escape hatch the reporterwanted is unreachable specifically while the bootstrap is broken.
config.jsonis not migrated to the XDG config root (expectation 3); thelayout change
d43c5f97dwas marked breaking ("feat!"), and no migration was added,but no statement says the loss was intended.
Verdict: intended-behavior. Confidence: high (direct RFC, documentation, and test
evidence for each headline behavior; the residual items are undocumented gaps rather
than contradictions).
This report was made by an LLM. The analysis may be wrong, and the potential fix might not work, but is intended as a starting point for exploring the issue.