diff --git a/desktop/flow-typed/npm/electron_v22.0.0.js b/desktop/flow-typed/npm/electron_v22.0.0.js --- a/desktop/flow-typed/npm/electron_v22.0.0.js +++ b/desktop/flow-typed/npm/electron_v22.0.0.js @@ -28,6 +28,24 @@ 'window-all-closed': () => void, 'activate': (event: Event, hasVisibleWindows: boolean) => void, 'quit': (event: Event, exitCode: number) => void, + 'render-process-gone': ( + event: Event, + webContents: WebContents, + details: { + reason: string, + exitCode: number, + }, + ) => void, + 'child-process-gone': ( + event: Event, + details: { + type: string, + reason: string, + exitCode: number, + serviceName?: string, + name?: string, + }, + ) => void, }; declare export class BrowserWindow { diff --git a/desktop/src/main.js b/desktop/src/main.js --- a/desktop/src/main.js +++ b/desktop/src/main.js @@ -316,6 +316,20 @@ app.quit(); } }); + + app.on('render-process-gone', (event, webContents, details) => { + console.error( + `EVENT: render-process-gone. Reason: '${details.reason}'. ` + + `ExitCode: '${details.exitCode}'.`, + ); + }); + + app.on('child-process-gone', (event, details) => { + console.error( + `EVENT: child-process-gone. Process type: '${details.type}'. ` + + `Reason: '${details.reason}'. ExitCode: '${details.exitCode}'.`, + ); + }); }; if (app.isPackaged && process.platform === 'win32') {