Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix: detect Rosetta to self-heal x64-on-arm64 auto-updates on macOS

Gabriel Steind1b209a1b89f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8cf3f2d01..caa43922b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- **macOS Auto-Update Architecture**: Detect Rosetta translation via `sysctl.proc_translated` so Apple Silicon users stuck on an x64 build from older releases self-heal to the native arm64 build on next update
- **Linux GTK Crash**: Force GTK3 on Linux startup to avoid GTK symbol crash on systems with GTK4 installed (#291)
- **CI Pipeline**: Added Windows paste binary and key listener download steps to the build workflow (#298)
- **Buy Me a Coffee**: Updated funding link username
diff --git a/src/updater.js b/src/updater.js
index ae98d2be8..397268519 100644
--- a/src/updater.js
+++ b/src/updater.js
@@ -40,7 +40,28 @@ class UpdateManager {
// Setting channel to e.g. 'latest-arm64' makes the updater look for
// 'latest-arm64-mac.yml' instead of the shared 'latest-mac.yml'.
if (process.platform === "darwin") {
- autoUpdater.channel = process.arch === "arm64" ? "latest-arm64" : "latest-x64";
+ let nativeArch = process.arch;
+
+ // Detect Rosetta: if an x64 build is running on Apple Silicon,
+ // sysctl.proc_translated returns "1". This self-heals users who
+ // got stuck on the x64 build from older releases.
+ if (process.arch === "x64") {
+ try {
+ const { execSync } = require("child_process");
+ const translated = execSync("sysctl -n sysctl.proc_translated", {
+ encoding: "utf8",
+ timeout: 3000,
+ }).trim();
+ if (translated === "1") {
+ console.log("πŸ”„ Rosetta detected β€” switching update channel to arm64");
+ nativeArch = "arm64";
+ }
+ } catch {
+ // sysctl.proc_translated doesn't exist on real Intel Macs β€” ignore
+ }
+ }
+
+ autoUpdater.channel = nativeArch === "arm64" ? "latest-arm64" : "latest-x64";
}
// Disable auto-download - let user control when to download