Files
privacy.sexy/tests/checks/desktop-runtime-errors/check-desktop-runtime-errors
undergroundwires 08dbfead7c Centralize log file and refactor desktop logging
- Migrate to `electron-log` v5.X.X, centralizing log files to adhere to
  best-practices.
- Add critical event logging in the log file.
- Replace `ElectronLog` type with `LogFunctions` for better abstraction.
- Unify log handling in `desktop-runtime-error` by removing
  `renderer.log` due to `electron-log` v5 changes.
- Update and extend logger interfaces, removing 'I' prefix and adding
  common log levels to abstract `electron-log` completely.
- Move logger interfaces to the application layer as it's cross-cutting
  concern, meanwhile keeping the implementations in the infrastructure
  layer.
- Introduce `useLogger` hook for easier logging in Vue components.
- Simplify `WindowVariables` by removing nullable properties.
- Improve documentation to clearly differentiate between desktop and web
  versions, outlining specific features of each.
2023-12-02 11:50:25 +01:00
..

check-desktop-runtime-errors

This script automates the processes of:

  1. Building
  2. Packaging
  3. Installing
  4. Executing
  5. Verifying Electron distributions

It runs the application for a duration and detects runtime errors in the packaged application via:

  • Log verification: Checking application logs for errors and validating successful application initialization.
  • stderr monitoring: Continuous listening to the stderr stream for unexpected errors.
  • Window title inspection: Checking for window titles that indicate crashes before logging becomes possible.

Upon error, the script captures a screenshot (if --screenshot is provided) and terminates.

Options

  • --build: Clears the electron distribution directory and forces a rebuild of the Electron app.
  • --screenshot: Takes a screenshot of the desktop environment after running the application.

This module provides utilities for building, executing, and validating Electron desktop apps. It can be used to automate checking for runtime errors during development.

Configs

Configurations are defined in config.ts.