[Bug]: A improvement in 0.1.61 causes fails to start the GUI
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 56/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- electron, javascript
研究方向
The report points to the preload sequence and process.getSystemMemoryInfo() in the desktop app. Read the code that sets residentChatLimit and check how it handles sandboxed Linux startup when retrieving system memory throws. Reproduce with the 0.1.61 AppImage in a sandboxed environment; done means the preload completes and the GUI loads without the renderer errors.
由索引模型根據 Issue 內容生成。
描述
GUI version
0.1.61
Operating system
Linux (Debian/Ubuntu)
Reproduction steps
- Launch
CommandCode-0.1.61-x86_64.AppImageon Linux (in our case upgraded from 0.1.60 via the in-app updater). - Wait for startup to finish. The main-process log reaches
window-created/ready-to-shownormally. - Observe the window: it shows the error page "An unexpected error occurred. Reloading usually fixes this..." (in some runs under Wayland the window never appears at all, while the process keeps running).
- Click Reload → the error page comes back every time; the app never becomes usable.
Expected behavior
The app loads its UI normally and the preload script installs without errors.
Actual behavior
Timeline captured with --enable-logging, in order of occurrence:
- First exception — start of the failure chain: the preload script fails to load:
Unable to load preload script: <AppDir>/resources/app/out/preload/index.js
Error: Unable to retrieve system memory information
- Because the preload never finishes, the IPC bridge is never installed; the renderer then crashes with:
TypeError: Cannot read properties of undefined (reading 'authStatus')
TypeError: Cannot read properties of undefined (reading 'onMenuAction')
- The renderer shows the generic error page. Every reload fails identically, so press the "reload" button never recovers.
Screenshots, recordings, or sanitized logs
An improvement introduced in 0.1.61—"The app stays responsive on 8 GB machines and while long replies stream"—involves setting a memory threshold in preload sequence:
const threshold = 8 * 2**30; // 8 GiB, in bytes
function chooseLimit(totalBytes) {
return totalBytes <= threshold ? 3 : 8;
}
residentChatLimit: chooseLimit(
process.getSystemMemoryInfo().total * 1024 // Convert KiB to bytes
)
(Comments added by the issue author)
This approach first checks the machine’s available memory and then selects a memory limit based on that amount. However, in a sandboxed environment, calling getSystemMemoryInfo() will throw an error, resulting in the message "Error: Unable to retrieve system memory information" during debugging, and the GUI will redirect to a generic error page. Starting the application with the --no-sandbox parameter may resolves this issue.
Safety check
- I removed credentials and private project information from this report.
- 主要語言
- Shell
- 星號
- 110
- 分支
- 9
- 平均合併
- 12 分鐘
- 30 天內合併 PR
- 1
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CommandCodeAI/desktop 的其他 Issue
-
[Bug]: v0.1.61 fails to initialize preload script due to system memory information error on Linux未關閉bug
難度 2/5 1-3 小時 新手友好度 68/100
CommandCodeAI/desktop#167 ·
-
enhancement
難度 5/5 一週以上 新手友好度 35/100
CommandCodeAI/desktop#164 ·
-
enhancement
難度 4/5 3-5 天 新手友好度 48/100
CommandCodeAI/desktop#163 · 1 個 reaction ·
-
enhancement
難度 5/5 一週以上 新手友好度 35/100
CommandCodeAI/desktop#162 ·
-
bug
難度 3/5 1-2 天 新手友好度 55/100
CommandCodeAI/desktop#161 ·
查看 CommandCodeAI/desktop 的全部 Issue
相似的 Issue
-
S3: friction & debt ws:testing
難度 2/5 1-3 小時 新手友好度 72/100
MedakaLang/medaka#5184 ·
維護者通常 1 天內回覆
-
automated issue report
難度 1/5 1 小時以內 新手友好度 78/100
a2aproject/A2A#2445 ·
維護者通常 2 天內回覆
-
難度 1/5 1 小時以內 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 75/100
MadiroGlobalHealth/UVL-EMR#580 ·
維護者通常 1 天內回覆
-
Storage with Nitro Sandboxes: clarify which CSI volumes are supported (third-party NFS volumes fail)未關閉
難度 2/5 1-3 小時 新手友好度 68/100
awsdocs/amazon-eks-user-guide#1259 ·