[Bug]: v0.1.61 fails to initialize preload script due to system memory information error on Linux
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- electron, javascript
- 领域
- desktop
调研方向
报告指出,out/preload/index.js 和对 process.getSystemMemoryInfo() 的调用可能是故障点。首先找到生成此调用的 preload 源代码,并检查它如何处理 sandboxed Linux 环境中的错误。完成标准是:即使无法获取内存信息,preload 桥接程序也能初始化;如果项目提供 Linux 启动方式或针对性测试,请据此验证。
由索引模型根据 Issue 内容生成。
描述
GUI version
0.1.61
Operating system
Linux (other)
Reproduction steps
Environment
Application: Command Code Desktop
GUI version: 0.1.61
Operating system: Manjaro Linux
Desktop environment: Hyprland
Display server: Wayland
GPU: NVIDIA GeForce RTX 5090
Installation type: AppImage
Upgrade path: Automatically upgraded from v0.1.60 using the in-app updater
Description
After Command Code automatically updated from v0.1.60 to v0.1.61, the application became unusable.
The main process starts normally, and the application window reaches the ready-to-show stage. However, the renderer displays the following generic error page:
"An unexpected error occurred. Reloading usually fixes this..."
Clicking Reload does not resolve the problem. The same error occurs repeatedly.
Expected behavior
The preload script should initialize successfully, and the application should remain usable even if system memory information cannot be retrieved.
Possible cause and suggested investigation
Could the development team investigate whether process.getSystemMemoryInfo() is failing in the sandboxed preload environment?
It may be worth adding error handling and a fallback value so that failure to retrieve system memory information does not prevent the entire preload script from initializing.
The --no-sandbox workaround mentioned in another report may be useful for diagnosis, but I have not independently verified it.
Impact
The application is completely unusable on my system after upgrading to v0.1.61.
Reloading does not recover the application.
Additional information
I have not modified system permissions, NVIDIA drivers, or Electron sandbox settings to work around this issue.
I can provide additional sanitized logs if needed.
Actual behavior
When launching the application with Chromium logging enabled:
AppImage/CommandCode-0.1.61-x86_64.AppImage --enable-logging=stderr --v=1
The following errors appear:
- Preload script initialization failure
Unable to load preload script:
.../resources/app/out/preload/index.js
Error: Unable to retrieve system memory information
- Renderer-side IPC bridge errors
TypeError: Cannot read properties of undefined (reading 'authStatus')
TypeError: Cannot read properties of undefined (reading 'onMenuAction')
Additional investigation
Inspection of the packaged preload script revealed the following code:
residentChatLimit: l(process.getSystemMemoryInfo().total * 1024),
The main window is configured with:
webPreferences: {
contextIsolation: true,
nodeIntegration: false,
sandbox: true
}
This suggests that the memory information call may be throwing an exception during preload initialization.
If this happens before contextBridge.exposeInMainWorld() executes, the electronAPI bridge will not be exposed to the renderer, which would explain the subsequent authStatus and onMenuAction errors.
I also found an independent report describing an almost identical failure on Linux with version 0.1.61, including the same system memory information error and subsequent IPC bridge errors.
This suggests the issue may not be specific to my system.
Screenshots, recordings, or sanitized logs
No response
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
难度 3/5 1-2 天 新手友好度 56/100
CommandCodeAI/desktop#166 ·
-
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 ·