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

Ouverte Adaptée aux débutants
#167 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
68/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
electron, javascript
Domaine
desktop

Piste de recherche

Le rapport identifie out/preload/index.js et l’appel à process.getSystemMemoryInfo() comme le point de défaillance probable. Commencez par localiser le code source de preload qui produit cet appel et vérifier comment il gère les erreurs dans l’environnement Linux sandboxé. Le travail est terminé lorsque le pont preload s’initialise même si les informations sur la mémoire sont indisponibles ; vérifiez-le avec un lancement sous Linux ou un test ciblé, si le projet en propose un.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
Shell
Étoiles
110
Forks
9
Merge moyen
12 min
PR mergées (30 j)
1

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CommandCodeAI/desktop

Toutes les issues de CommandCodeAI/desktop

Issues similaires

Plus d'issues Shell/Bash

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.