GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Upgrade failed · Issue #3422 · voidzero-dev/vite-plus

Upgrade failed #3422

New issue
Copy link
New issue
Copy link
Closed
Bug
#3425
Closed
Upgrade failed#3422
Bug
#3425
Copy link
Assignees
naokihaba
Labels
pending triage

Description

@toggery
toggery
opened on Nov 10, 2026
Issue body actions

Describe the bug

vp upgrade
info: checking for updates...
info: found [email protected] (current: 1.5.0)
info: downloading [email protected] for win32-x64-msvc...
info: installing...
error: Setup error: Failed to install Node.js 24.22.2: Failed to download from https://mirrors.aliyun.com/nodejs-release/v24.22.2/SHASUMS256.txt: HTTP status client error (403 Forbidden) for url (https://mirrors.aliyun.com/nodejs-release/v24.22.2/SHASUMS256.txt)

Reproduction

https://github.com/voidzero-dev/vite-plus/releases/tag/v1.5.1

Steps to reproduce

No response

System Info

vp env current
VITE+ - The Unified Toolchain for the Web

Node.js:
  Version    24.15.0
  Source     lts
  Bin Path   C:\Users\togger\.vite-plus\js_runtime\node\24.15.0\node.exe
  Installed  true
  Mode       managed

vp --version
VITE+ - The Unified Toolchain for the Web

vp v1.5.0

Local vite-plus:
  vite-plus  Not found

Tools:
  vite             Not found
  rolldown         Not found
  vitest           Not found
  oxfmt            Not found
  oxlint           Not found
  oxlint-tsgolint  Not found
  tsdown           Not found

Used Package Manager

pnpm

Logs

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.

Activity

  1. toggery
    added
    pending triage
    on Nov 10, 2026
  2. toggery
    added the
    Bug
    issue type on Nov 10, 2026
  3. naokihaba
    self-assigned this
    on Nov 10, 2026
  4. naokihaba commented on Nov 10, 2026

    @naokihaba
    naokihaba
    on Nov 10, 2026
    Collaborator
    More actions

    I investigated this issue and made a reproduction at https://github.com/naokihaba/vite-plus-issue-3422. The aliyun mirror returns 403 for requests without a User-Agent header. vp sends its Node.js download requests without this header. This causes the error.

    My first hypothesis was that the mirror had not synced Node.js 24.22.2 yet. This is not the cause. The mirror lists v24.22.2/SHASUMS256.txt with the timestamp 2026-10-29 02:35, UTC+8. nodejs.org sends Last-Modified: Wed, 28 Oct 2026 18:35:19 GMT for the same file. Both timestamps are the same time. The reporter opened this issue on 2026-11-10, 12 days later.

    https://mirrors.aliyun.com/nodejs-release/v24.22.2/

    My second hypothesis was that the mirror blocks requests without a User-Agent header. This is the cause. curl with its default User-Agent gets 200. curl -H 'User-Agent:' gets 403 on 5 out of 5 requests. vp_shared::shared_http_client in crates/vp_shared/src/http.rs does not set a User-Agent, and reqwest does not send one by default. I also ran a local mirror that logs request headers. It shows that vp sends GET /v24.22.2/SHASUMS256.txt with no User-Agent.

    vp upgrade installs the dependencies of the new release with the Node.js version in vpNodeVersion. The platform package metadata has this field. curl -s https://registry.npmjs.org/@voidzero-dev%2Fvite-plus-cli-darwin-arm64/1.5.1 | jq .vpNodeVersion returns "24.22.2". The upgrade does not use the Node.js that vp env manages, which is 24.15.0 in this report. If the runtime cache does not contain 24.22.2, vp downloads it from VP_NODE_DIST_MIRROR.

    With VP_NODE_DIST_MIRROR=https://mirrors.aliyun.com/nodejs-release, vp upgrade from 1.5.0 to 1.5.1 fails with the same 403 Forbidden error as this report. A local mirror that rejects requests without a User-Agent gives the same error. Without VP_NODE_DIST_MIRROR, vp uses nodejs.org, and the upgrade succeeds.

    Reacted by MK (fengmk2)
  5. naokihaba commented on Nov 10, 2026

    @naokihaba
    naokihaba
    on Nov 10, 2026
    Collaborator
    More actions

    I also checked other Node.js mirrors in China. I am not familiar with these mirrors, so I asked an AI assistant to list them. I sent a request without a User-Agent header to v24.22.2/SHASUMS256.txt on each mirror. Only aliyun returns 403.

    Mirror Without User-Agent
    https://mirrors.aliyun.com/nodejs-release 403
    https://npmmirror.com/mirrors/node 200
    https://mirrors.tuna.tsinghua.edu.cn/nodejs-release 200
    https://mirrors.ustc.edu.cn/node 200
    https://mirrors.huaweicloud.com/nodejs 200
    https://mirrors.cloud.tencent.com/nodejs-release 200

    With VP_NODE_DIST_MIRROR=https://npmmirror.com/mirrors/node, vp upgrade from 1.5.0 to 1.5.1 succeeds with the same 1.5.0 binary.

    Script
    (
      set -e
      export VP_HOME="$(mktemp -d)"
      export VP_SELF_SETUP_NO_MODIFY_PATH=1
      trap 'rm -rf -- "$VP_HOME"' EXIT
      unset VP_NODE_DIST_MIRROR
    
      # 1. Install vp 1.5.0
      curl -fsSL https://vite.plus | VP_VERSION=1.5.0 bash >/dev/null
      export PATH="$VP_HOME/bin:$PATH"
      vp --version | head -1
    
      # 2. Remove the cached Node.js to match the reporter's state
      rm -rf -- "$VP_HOME/js_runtime/node/"[0-9]*
    
      # 3. Upgrade through aliyun (fails with 403)
      VP_NODE_DIST_MIRROR=https://mirrors.aliyun.com/nodejs-release vp upgrade 1.5.1 || true
    
      # 4. Upgrade through npmmirror (succeeds)
      VP_NODE_DIST_MIRROR=https://npmmirror.com/mirrors/node vp upgrade 1.5.1
      vp --version | head -1
    )
    Log from macOS arm64, with the setup output trimmed
    ✓ Vite+ setup complete.
    vp v1.5.0
    info: checking for updates...
    info: found [email protected] (current: 1.5.0)
    info: downloading [email protected] for darwin-arm64...
    info: installing...
    error: Setup error: Failed to install Node.js 24.22.2: Failed to download from https://mirrors.aliyun.com/nodejs-release/v24.22.2/SHASUMS256.txt: HTTP status client error (403 Forbidden) for url (https://mirrors.aliyun.com/nodejs-release/v24.22.2/SHASUMS256.txt)
    info: checking for updates...
    info: found [email protected] (current: 1.5.0)
    info: downloading [email protected] for darwin-arm64...
    info: installing...
    ✓ Dependencies installed.
    
    ✓ Updated vite-plus from 1.5.0 → 1.5.1
    
      Run `vp migrate` in any Vite+ project using a version under 1.5.1 to upgrade that project's Vite+ version.
    
      Release notes: https://github.com/voidzero-dev/vite-plus/releases/tag/v1.5.1
    vp v1.5.1
    
  6. naokihaba commented on Nov 10, 2026

    @naokihaba
    naokihaba
    on Nov 10, 2026
    Collaborator
    More actions

    @toggery
    vp does not send a User-Agent header. The aliyun mirror returns 403 for requests without this header. Other mirrors in China, for example npmmirror, accept these requests.

    As a permanent fix, we are considering making vp send a User-Agent header. Only new versions of vp will have this fix. During vp upgrade, your installed version downloads Node.js, so the upgrade to the fixed version will also fail with aliyun. You will need to change the mirror temporarily for that upgrade.

    Can you change VP_NODE_DIST_MIRROR to a different mirror in your environment?

    If you cannot change the mirror, please tell us the reason, for example a network policy. We will use your answer to choose the fix.

    Reacted by Togger JIANG
  7. naokihaba commented on Nov 10, 2026

    @naokihaba
    naokihaba
    on Nov 10, 2026
    Collaborator
    More actions

    Update: fengmk2 agreed with this approach ("We can add a User-Agent header to fix this."). I am working on the fix.

    @fengmk2

    I want to discuss the investigation result and the fix plan for #3422. vp does not send a User-Agent header in its HTTP requests. The Alibaba Cloud mirror at mirrors.aliyun.com returns 403 for requests without this header. When VP_NODE_DIST_MIRROR points to aliyun, vp upgrade cannot download Node.js and fails. A new installation with the install script fails with the same error.

    I propose to set a User-Agent such as vp/<version> on all requests in the shared HTTP client. The change is in build_with in crates/vp_shared/src/http.rs. npm and pnpm send a User-Agent by default. I checked this with a local server that logs request headers. npm 11.20.0 sent npm/11.20.0 node/v26.13.0 darwin arm64 workspaces/false. pnpm 12.18.0 sent pnpm/12.18.0 npm/? node/? darwin arm64.

    This fix has one limit. During vp upgrade, the installed binary downloads Node.js. The binaries that users have now do not have the fix, so these users cannot upgrade to the fixed version through aliyun. We will need to ask them to change the mirror only for the upgrade. I confirmed that vp upgrade from 1.5.0 to 1.5.1 succeeds with VP_NODE_DIST_MIRROR=https://npmmirror.com/mirrors/node.

    I do not know the mirror situation in China well. I asked the reporter in the issue if they can change the mirror, and I am waiting for the answer.

    Is it OK to fix this by setting the User-Agent on all requests?

    The reproduction is at https://github.com/naokihaba/vite-plus-issue-3422.

  8. fengmk2
    closed this as completedin #3425on Nov 10, 2026
  9. naokihaba commented on Nov 10, 2026

    @naokihaba
    naokihaba
    on Nov 10, 2026
    Collaborator
    More actions

    @toggery
    We merged the fix in #3425. vp now sends a User-Agent header, so the aliyun mirror accepts its requests. The next release will include this fix.

    Your installed vp does not have the fix, so the upgrade to the next release will also fail with aliyun. For this upgrade only, please change the mirror. For example, in PowerShell:

    $env:VP_NODE_DIST_MIRROR="https://npmmirror.com/mirrors/node"
    vp upgrade

    After the upgrade, you can use the aliyun mirror again.

    Reacted by Togger JIANG
    Reacted by Togger JIANG
  10. liangmiQwQ
    added a commit that references this issue on Nov 10, 2026

    fix(http): send a User-Agent header on all requests (voidzero-dev#3425)

    This issue will close once commit 511e006 is merged into the 'main' branch.
    511e006
  11. toggery commented on Nov 13, 2026

    @toggery
    toggery
    on Nov 13, 2026
    Author
    More actions

    @naokihaba
    Thank you very much for your quick reponse and effective solutions.
    Yes, I can change VP_NODE_DIST_MIRROR and upgrade successfully.

    Reacted by NaokiHaba
  12. naokihaba commented on Nov 13, 2026

    @naokihaba
    naokihaba
    on Nov 13, 2026
    Collaborator
    More actions

    @naokihaba Thank you very much for your quick reponse and effective solutions. Yes, I can change VP_NODE_DIST_MIRROR and upgrade successfully.

    I'm so glad to hear that!
    Thank you very much for letting me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @naokihaba
    naokihaba

Labels

pending triage

Type

Bug

Fields

Priority

None yet

Effort

None yet

Target date

None yet

Start date

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.