Bug Report
Summary
ClawControl v1.2.0 Electron app crashes on Linux (Pop!_OS) with a runtime error: "TypeError: Cannot read properties of undefined (reading 'on')"
Environment
- OS: Pop!_OS (likely Cosmic Desktop based on
gnome-session* targets visible)
- Node.js: v18.x (from dist-electron/main.js minified)
- Electron: Latest version (implied by error)
- Systemd: User session, configured with user-level service
Steps to Reproduce
- Clone repo:
git clone https://github.com/jakeledwards/ClawControl.git
- Install:
npm install
- Run:
npm run dev
Expected Behavior
Application should start Electron main window normally.
Actual Behavior
Application crashes immediately with error:
TypeError: Cannot read properties of undefined (reading 'on')
at Module.<anonymous> (/home/apoapostolov/git-ext/ClawControl/dist-electron/main.js:1:2333)
at Object.<anonymous> (/home/apoapostolov/git-ext/ClawControl/dist-electron/main.js:1:2333)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main_module:154:5)
at node:internal/main/run_main_module:33:47)
Error Details
The error occurs in Electron's main process when it tries to access properties of an undefined object using the 'on' key. This suggests:
- Some object that should exist is undefined
- Possibly platform-specific issue with Electron on Linux/Pop!_OS
- May be related to how the app initializes the main process
Additional Context
- The app is built with Electron + React + Vite
- Uses Capacitor for some platform integrations
- The error occurs during app startup (before any user interaction)
- Build completes successfully (npm run build shows no errors)
- Runtime error only happens when executing the built app
Suggested Fix
Investigate which object is supposed to have the 'on' property being read. This may be:
- The global
app object from Electron
- A configuration object that's not properly initialized
- BrowserWindow instance that's being accessed before initialization
Bug Report
Summary
ClawControl v1.2.0 Electron app crashes on Linux (Pop!_OS) with a runtime error: "TypeError: Cannot read properties of undefined (reading 'on')"
Environment
gnome-session*targets visible)Steps to Reproduce
git clone https://github.com/jakeledwards/ClawControl.gitnpm installnpm run devExpected Behavior
Application should start Electron main window normally.
Actual Behavior
Application crashes immediately with error:
Error Details
The error occurs in Electron's main process when it tries to access properties of an undefined object using the
'on'key. This suggests:Additional Context
Suggested Fix
Investigate which object is supposed to have the
'on'property being read. This may be:appobject from Electron