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

Abierto Apto para principiantes
#167 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
electron, javascript
Área
desktop

Línea de trabajo

El informe identifica out/preload/index.js y la llamada a process.getSystemMemoryInfo() como el probable punto de fallo. Empieza por localizar el código fuente de preload que genera esta llamada y comprobar cómo gestiona los errores en el entorno Linux aislado. El objetivo se alcanza cuando el puente de preload se inicializa aunque no haya información de memoria disponible; verifícalo con un inicio en Linux o con una prueba específica, si el proyecto ofrece una.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Shell
Estrellas
110
Forks
9
Merge medio
12 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CommandCodeAI/desktop

Todos los issues de CommandCodeAI/desktop

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.