From c51f3eb25e7c56ba45eb316240d950b87dbff4b5 Mon Sep 17 00:00:00 2001 From: MasterAcnolo <68693319+MasterAcnolo@users.noreply.github.com> Date: Sat, 15 Aug 2026 13:44:47 +0200 Subject: [PATCH] fix: autoupdater disabled on Flatpak and Snap env --- app/autoUpdater.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/autoUpdater.js b/app/autoUpdater.js index d153712..bbb800a 100644 --- a/app/autoUpdater.js +++ b/app/autoUpdater.js @@ -121,8 +121,14 @@ function initAutoUpdater(mainWindow) { */ async function checkForUpdates() { - if (process.env.SNAP) { - logger.info("Running as Snap, update managed by snapd, skipping electron-updater"); + /** + * Prevents electron-updater from running inside sandboxed environments. + * Snap and Flatpak lock the file system in read-only mode, causing the updater to crash. + * In these environments, updates are safely handled by snapd or the Flatpak runtime. + * Standalone Linux packages (.deb, .rpm, AppImage) will bypass this and update normally. + */ + if (process.env.SNAP || process.env.FLATPAK_ID) { + logger.info("Running as Snap or Flatpak. Updates are managed by the OS store. Skipping electron-updater."); return; }