[Bug]: v0.1.61 fails to initialize preload script due to system memory information error on Linux

オープン 初心者向け
#167 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
electron, javascript
領域
desktop

調査の方向性

レポートでは、out/preload/index.js と process.getSystemMemoryInfo() の呼び出しが、障害の発生箇所である可能性が高いとされています。まず、この呼び出しを生成する preload のソースコードを見つけ、sandboxed Linux 環境でエラーをどのように処理しているかを確認してください。メモリ情報を取得できない場合でも preload ブリッジが初期化されれば完了です。プロジェクトに Linux での起動方法または対象を絞ったテストがあれば、それで検証してください。

索引モデルが issue の本文から書いたものです。

説明

bug
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:

  1. Preload script initialization failure

Unable to load preload script:
.../resources/app/out/preload/index.js

Error: Unable to retrieve system memory information

  1. 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分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CommandCodeAI/desktop のほかの issue

CommandCodeAI/desktop の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。