Description
The desktop app (OpenCode.app on macOS) throws an uncaught exception referencing a destroyed BrowserWindow object. Full stack trace:
Uncaught Exception:
TypeError: Object has been destroyed
at BrowserWindow. (file:///Applications/OpenCode.app/Contents/Resources/app.asar/out/main/index.js:1389:76)
at BrowserWindow.emit (node:events:509:28)
at WebContents. (node:electron/js2c/browser_init:2:18806)
at WebContents.emit (node:events:509:28)
at file:///Applications/OpenCode.app/Contents/Resources/app.asar/out/main/index.js:3468:11
at
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
This looks like an event listener on a BrowserWindow/WebContents firing after the window has already been destroyed (missing an isDestroyed() guard before accessing the window).
Plugins
No response
OpenCode version
v1.17.13
Steps to reproduce
- Open OpenCode Desktop
- [action that triggers it, e.g. close a window / quit the app]
- Uncaught exception appears in console/logs
Screenshot and/or share link
No response
Operating System
26.2 (25C56)
Terminal
Ghostly
Description
The desktop app (OpenCode.app on macOS) throws an uncaught exception referencing a destroyed BrowserWindow object. Full stack trace:
Uncaught Exception:
TypeError: Object has been destroyed
at BrowserWindow. (file:///Applications/OpenCode.app/Contents/Resources/app.asar/out/main/index.js:1389:76)
at BrowserWindow.emit (node:events:509:28)
at WebContents. (node:electron/js2c/browser_init:2:18806)
at WebContents.emit (node:events:509:28)
at file:///Applications/OpenCode.app/Contents/Resources/app.asar/out/main/index.js:3468:11
at
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
This looks like an event listener on a BrowserWindow/WebContents firing after the window has already been destroyed (missing an isDestroyed() guard before accessing the window).
Plugins
No response
OpenCode version
v1.17.13
Steps to reproduce
Screenshot and/or share link
No response
Operating System
26.2 (25C56)
Terminal
Ghostly