Native copilot.exe binary silently exits with code 1 on Windows x64, npm-loader.js never falls back to JS implementation
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 62/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, nodejs
- 領域
- cli
研究方向
從 npm-loader.js 中的 spawnSync 呼叫開始,將其失敗路徑與 import index.js 進行比較。在 Windows x64 上使用會失敗的原生可執行檔執行 copilot --version,然後驗證當原生程序以非零結束碼結束時,JavaScript 實作會執行並回傳其結果。
由索引模型根據 Issue 內容生成。
描述
Description
The native copilot.exe binary (both WinGet v0.0.410 and npm v0.0.412) silently exits with code 1 on Windows 11 x64, producing no stdout or stderr output. This makes the Copilot CLI completely unusable.
The npm-loader.js entrypoint unconditionally exits with the native binary's exit code (process.exit(r.status??1)), which prevents the JavaScript fallback (index.js) from ever being reached when the native binary fails.
Steps to Reproduce
- Install
@github/copilotvia npm (npm install -g @github/copilot) or WinGet (winget install GitHub.Copilot) - Run
copilot --version - Binary exits with code 1, no output
Expected Behavior
Either:
- The native binary should work correctly, OR
npm-loader.jsshould fall back to the JS implementation when the native binary fails
Actual Behavior
copilot.exeexits with code 1, no stdout/stderrnpm-loader.jscallsprocess.exit(r.status??1)afterspawnSync, so it exits with 1 without trying the JS fallback- The JS implementation (
node index.js) works perfectly
Workaround
In npm-loader.js, change:
process.exit(r.status??1)
to:
if(r.status===0)process.exit(0)
This allows the JS fallback via import("./index.js") to run when the native binary fails.
Environment
- OS: Windows 11 Enterprise 25H2 (Build 26200)
- Architecture: x64 (AMD64)
- Node.js: v25.6.1
- npm: 11.9.0
- Copilot CLI (WinGet): v0.0.410
- Copilot CLI (npm): 0.0.412
- gh CLI: 2.86.0
Additional Context
- The native binary is a valid signed PE x64 executable (signature verified)
LoadLibraryExsucceeds on the binary (no missing DLL dependencies)- No Windows Defender blocks, no AppLocker policies, no Zone.Identifier ADS
- No crash dumps or WER reports generated
- The binary produces zero output to both stdout and stderr
- Running from any directory, any terminal (PowerShell, cmd), with or without admin privileges — same result
- 主要語言
- Shell
- 星號
- 11.2k
- 分支
- 1.9k
- 平均合併
- 14 小時 16 分鐘
- 30 天內合併 PR
- 6
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/copilot-cli 的其他 Issue
-
triage
難度 2/5 1-3 小時 新手友好度 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
難度 2/5 1-3 小時 新手友好度 72/100
github/copilot-cli#4729 ·
-
area:sessions
難度 2/5 1-3 小時 新手友好度 72/100
github/copilot-cli#4712 ·
-
triage
難度 2/5 1-3 小時 新手友好度 75/100
github/copilot-cli#4638 ·
-
Expose large_output_file_path on TaskShellProgress so clients can read complete shell-task output 未關閉area:tools
難度 2/5 1-3 小時 新手友好度 78/100
github/copilot-cli#4630 · 1 則留言 ·
查看 github/copilot-cli 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 90/100
danielmiessler/LifeOS#2218 ·
-
難度 1/5 1 小時以內 新手友好度 92/100
-
package-update
難度 2/5 1-3 小時 新手友好度 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
-
chore
難度 1/5 1 小時以內 新手友好度 91/100
alunduil/alunduil-chezmoi#792 ·