From d603d560c38ada3f4dcf13a3ec301ea9f575b3f2 Mon Sep 17 00:00:00 2001 From: Koi <38512047+datlt4@users.noreply.github.com> Date: Mon, 21 Sep 2026 05:58:20 +0700 Subject: [PATCH] fix(macos): skip single-instance lock in Mac App Store builds (#1454) fix(macos): skip single-instance lock in Mac App Store builds --- electron/main.cjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electron/main.cjs b/electron/main.cjs index 6123889f9..4af3aec2d 100644 --- a/electron/main.cjs +++ b/electron/main.cjs @@ -1227,7 +1227,9 @@ function stopBackendServer() { }); } -const gotTheLock = app.requestSingleInstanceLock(); +// App Sandbox denies the singleton socket bind, which reads as a held lock and +// quits the app on every launch. macOS reactivates bundled apps anyway. +const gotTheLock = process.mas || app.requestSingleInstanceLock(); if (!gotTheLock) { console.log("Another instance is already running, quitting..."); app.quit();