diff --git a/main/config.ts b/main/config.ts index 3bf6361..3a942d5 100644 --- a/main/config.ts +++ b/main/config.ts @@ -102,6 +102,9 @@ export default function loadConfig(): Promise { recommendConfigAndDie(CONFIG_FILE); } else { config.__DATA_DIR = DATA_DIR; + if (config.chromium_sandbox === undefined) { + config.chromium_sandbox = true; + } resolve(config); } } catch (e) { diff --git a/main/index.ts b/main/index.ts index 1f09183..e75fbe8 100644 --- a/main/index.ts +++ b/main/index.ts @@ -10,8 +10,8 @@ app.removeAllListeners(); const appReady = new Promise(resolve => app.once('ready', resolve)); process.on('unhandledRejection', (reason: string) => { - const msg = 'FATAL: Unhandled rejection! Reason: ' + reason - appReady.then(() => { + const msg = 'FATAL: Unhandled rejection! Reason: ' + reason; + appReady.then(() => dialog.showMessageBox({ type: 'error', buttons: ['OK'], @@ -19,7 +19,7 @@ process.on('unhandledRejection', (reason: string) => { }, () => { app.quit(); }) - }); + ); log.error(msg); });