Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions electron-app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import { app, BrowserWindow, dialog, screen } from "electron";
import pkg from "electron-updater";
import fs from "fs";
import { getConfigManager } from "./src/config/configInstance.js";
import { setupIpcHandlers } from "./src/ipc/handlers.js";
import { startBackend, stopBackend } from "./src/processes/backend.js";
Expand All @@ -17,13 +16,6 @@ import { createWindow } from "./src/windows/mainWindow.js";

const { autoUpdater } = pkg;

// Disable sandbox on Linux — sandbox restrictions vary across distros
// (AppArmor on Ubuntu, SELinux on Fedora, etc.) and this is an internal
// app where all content is trusted.
if (process.platform === "linux") {
app.commandLine.appendSwitch("no-sandbox");
}

// Setup IPC handlers for renderer process communication
setupIpcHandlers();

Expand Down
3 changes: 2 additions & 1 deletion electron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
],
"icon": "icons/512x512.png",
"category": "Utility",
"artifactName": "${productName}-${version}-linux-${arch}.${ext}"
"artifactName": "${productName}-${version}-linux-${arch}.${ext}",
"executableArgs": ["--no-sandbox"]
}
}
}
6 changes: 5 additions & 1 deletion electron-app/src/processes/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ async function startBackend(logWindow = null) {
logger.backend.info(text);

// Send log message to log window
if (currentLogWindow && !currentLogWindow.isDestroyed()) {
if (
currentLogWindow &&
!currentLogWindow.isDestroyed() &&
currentLogWindow.webContents
) {
const htmlData = convert.toHtml(text);
currentLogWindow.webContents.send("log", htmlData);
}
Expand Down
Loading