diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index bab533327397..5361ec01cb06 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -1675,7 +1675,7 @@ const registerGlobalHotkey = (accelerator: string) => { } }; -app.whenReady().then(async () => { +async function appMain() { // Ensure Windows shims are available before any MCP processes are spawned await ensureWinShims(); @@ -2144,6 +2144,15 @@ app.whenReady().then(async () => { return false; } }); +} + +app.whenReady().then(async () => { + try { + await appMain(); + } catch (error) { + dialog.showErrorBox('Goose Error', `Failed to create main window: ${error}`); + app.quit(); + } }); async function getAllowList(): Promise {