Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Local desktop control: say macOS 13 is needed instead of loading the driver on older Macs

Bugfixer 2f126f8a4d506
diff --git a/electron/capabilities.cjs b/electron/capabilities.cjs
index 8754fcdccf..15ad767c8c 100644
--- a/electron/capabilities.cjs
+++ b/electron/capabilities.cjs
@@ -67,6 +67,13 @@ function linuxLocalControlSupport(platform, env, { hyprlandPlugin } = {}) {
});
}
+/** macOS 12 and older (Darwin before 22): the driver is built for macOS 13 and fails to load, so it is never tried there. */
+function macDriverUnsupported(platform, release) {
+ const darwinMajor = Number(String(release).split(".")[0]);
+ if (platform !== "darwin" || !darwinMajor || darwinMajor >= 22) return null;
+ return { reasonCode: "macos-version-unsupported", reason: "Local desktop control needs macOS 13 Ventura or later." };
+}
+
/** Computer control's helper is gone, or the system refused to run it: access denied (os error 5), or Windows Security
* found it unsafe (os error 225, ERROR_VIRUS_INFECTED). */
function driverBlocked(reason) {
@@ -247,5 +254,6 @@ module.exports = {
linuxLocalControlSupport,
linuxSession,
localComputerReady,
+ macDriverUnsupported,
nativeDesktopActions,
};
diff --git a/electron/capabilities.test.mjs b/electron/capabilities.test.mjs
index 7e482b4efe..ff6c6f1c9f 100644
--- a/electron/capabilities.test.mjs
+++ b/electron/capabilities.test.mjs
@@ -7,6 +7,7 @@ const {
linuxLocalControlSupport,
linuxSession,
localComputerReady,
+ macDriverUnsupported,
nativeDesktopActions,
} = require("./capabilities.cjs");
const readyConnection = (mode = "embedded") => ({
@@ -362,3 +363,22 @@ describe("desktop capabilities", () => {
});
});
});
+
+describe("Mac driver support", () => {
+ it("names macOS 12 and older as too old for the driver, before it is loaded", () => {
+ const tooOld = { reasonCode: "macos-version-unsupported", reason: "Local desktop control needs macOS 13 Ventura or later." };
+ expect(macDriverUnsupported("darwin", "21.6.0")).toEqual(tooOld);
+ expect(macDriverUnsupported("darwin", "20.6.0")).toEqual(tooOld);
+ expect(macDriverUnsupported("darwin", "22.1.0")).toBeNull();
+ expect(macDriverUnsupported("darwin", "25.0.0")).toBeNull();
+ expect(macDriverUnsupported("win32", "10.0.19045")).toBeNull();
+ expect(macDriverUnsupported("darwin", "")).toBeNull();
+ });
+
+ it("keeps the too-old code for the page", () => {
+ const localConnection = { mode: "unavailable", ...macDriverUnsupported("darwin", "21.6.0") };
+ expect(desktopCapabilities({ platform: "darwin", localConnection }).localComputer).toMatchObject({
+ available: false, reasonCode: "macos-version-unsupported", message: "Local desktop control needs macOS 13 Ventura or later.",
+ });
+ });
+});
diff --git a/electron/cua.mjs b/electron/cua.mjs
index b24fdf476b..602c480655 100644
--- a/electron/cua.mjs
+++ b/electron/cua.mjs
@@ -32,7 +32,7 @@ const {
reapStaleAppImageCuaBundles,
stageAppImageCuaBundle,
} = require("./cua-linux-bundle.cjs");
-const { driverBlocked, linuxLocalControlSupport } = require("./capabilities.cjs");
+const { driverBlocked, linuxLocalControlSupport, macDriverUnsupported } = require("./capabilities.cjs");
const { probeCuaHyprlandPlugin } = require("./cua-hyprland.cjs");
const INSTALLED_DRIVER = "/Applications/CuaDriver.app/Contents/MacOS/cua-driver";
@@ -319,6 +319,8 @@ async function startEmbedded(binary, signal) {
export async function startCua({ attempt = 0 } = {}) {
if (process.platform === "linux") return (await ensureLinuxRuntime()).initialize();
+ const tooOld = macDriverUnsupported(process.platform, os.release());
+ if (tooOld) return persistAndNotify({ mode: "unavailable", ...tooOld });
clearTimeout(retryTimer);
retryTimer = null;
lifecycleGeneration++;
diff --git a/src/components/MacLocalControl.test.ts b/src/components/MacLocalControl.test.ts
index fa78d60635..4859249216 100644
--- a/src/components/MacLocalControl.test.ts
+++ b/src/components/MacLocalControl.test.ts
@@ -34,6 +34,11 @@ describe("Mac local computer status", () => {
expect(markup).not.toContain("Relaunch MausBot</button>");
});
+ it("offers no permission repair on a Mac too old for the driver", () => {
+ fixture.localComputer = { available: false, status: "unavailable", reasonCode: "macos-version-unsupported", message: "Local desktop control needs macOS 13 Ventura or later." } as DesktopCapabilities["localComputer"];
+ expect(renderToStaticMarkup(createElement(MacLocalControl))).toBe("");
+ });
+
it("does not offer host repair actions to a remote renderer", () => {
fixture.localComputer = { available: false, status: "unavailable", reasonCode: "remote-server" } as DesktopCapabilities["localComputer"];
expect(renderToStaticMarkup(createElement(MacLocalControl))).toBe("");
diff --git a/src/components/MacLocalControl.tsx b/src/components/MacLocalControl.tsx
index 56e164f3db..85b9b7369c 100644
--- a/src/components/MacLocalControl.tsx
+++ b/src/components/MacLocalControl.tsx
@@ -77,7 +77,8 @@ export function MacLocalControl() {
}, [awaitingGrant, hidden]);
if (capabilities.host.platform !== "darwin" || capabilities.localComputer.reasonCode === "remote-server") return null;
- if (capabilities.localComputer.available || hidden) return null;
+ // Too old a macOS: no permission or retry helps, and the computer picker already says to update.
+ if (capabilities.localComputer.available || hidden || capabilities.localComputer.reasonCode === "macos-version-unsupported") return null;
if (settings) {
// In Settings: an ordinary row. A 16 px warning mark, the title, its reason, and one primary; Retry and Not now quiet.
diff --git a/src/lib/local-computer.test.ts b/src/lib/local-computer.test.ts
index 454407c471..099da3bc09 100644
--- a/src/lib/local-computer.test.ts
+++ b/src/lib/local-computer.test.ts
@@ -107,6 +107,16 @@ describe("local computer UI eligibility", () => {
);
});
+ it("tells a Mac older than macOS 13 to update, not to grant permissions", () => {
+ const capabilities = {
+ host: { platform: "darwin" as const, label: "Mac" },
+ localComputer: { available: false, enabled: false, status: "unavailable", reasonCode: "macos-version-unsupported" },
+ } as DesktopCapabilities;
+ expect(localComputerDisabledReason({ capabilities, providerSupportsLocal: true })).toBe(
+ "Bots can't use this Mac: local desktop control needs macOS 13 Ventura or later. Update macOS to use it.",
+ );
+ });
+
it("preserves the ready local fallback on supported non-Linux hosts", () => {
expect(
autoSelectsLocalComputer({
diff --git a/src/lib/local-computer.ts b/src/lib/local-computer.ts
index daa57d87f8..6c0ca1e9f8 100644
--- a/src/lib/local-computer.ts
+++ b/src/lib/local-computer.ts
@@ -48,6 +48,7 @@ export function localComputerDisabledReason({
}
if (capabilities.host.label === "Browser") return t("computer.problem.localNeedsApp");
if (capabilities.host.platform === "win32") return t("computer.problem.localWindows");
+ if (capabilities.localComputer.reasonCode === "macos-version-unsupported") return t("computer.problem.localMacTooOld");
return t("computer.problem.localMac");
}
diff --git a/src/locales/de.json b/src/locales/de.json
index d07f596285..b47a4532b2 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -2766,6 +2766,7 @@
"computer.problem.localNeedsApp": "Nur die {app}-App auf diesem Computer kann einen Bot ihn benutzen lassen. Öffne die App hier, um ihn zu benutzen.",
"computer.problem.localWindows": "Bots können diesen PC gerade nicht benutzen. Starte {app} neu, und wenn das nicht hilft, öffne Einstellungen → Diese App → Hilfe.",
"computer.problem.localMac": "Bots können diesen Mac noch nicht benutzen. Prüfe, ob {app} in Systemeinstellungen → Datenschutz & Sicherheit unter Bildschirmaufnahme und Bedienungshilfen erlaubt ist, und starte es dann neu.",
+ "computer.problem.localMacTooOld": "Bots können diesen Mac nicht benutzen: Die lokale Desktopsteuerung braucht macOS 13 Ventura oder neuer. Aktualisiere macOS, um sie zu nutzen.",
"place.view.ccNeedsKey.short": "Zuerst Boat verbinden",
"place.action.addBoatKey": "Boat verbinden",
"place.view.browserOff.short": "Ausgeschaltet",
diff --git a/src/locales/en.json b/src/locales/en.json
index 1245468a95..80445da9b3 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -5308,6 +5308,7 @@
"computer.problem.localNeedsApp": "Only the {app} app on this computer can let a bot use it. Open the app here to use it.",
"computer.problem.localWindows": "Bots can't use this PC right now. Restart {app}, and if that doesn't help, open Settings → This app → Help.",
"computer.problem.localMac": "Bots can't use this Mac yet. Check that {app} is allowed under Screen Recording and Accessibility in System Settings → Privacy & Security, then restart it.",
+ "computer.problem.localMacTooOld": "Bots can't use this Mac: local desktop control needs macOS 13 Ventura or later. Update macOS to use it.",
"computer.problem.localRemoteServer": "Bots on your own server can't use this computer. Switch back to This computer to use it.",
"computer.problem.oldImage": "The private desktop is out of date; replace it",
"computer.problem.unmanaged": "The existing container was not created by {app}; recreate it",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index cae5295a88..c48b6e6450 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -8068,6 +8068,7 @@
"computer.problem.localNeedsApp": "Só o app {app} neste computador pode permitir que um bot use a máquina. Abra o app aqui para isso.",
"computer.problem.localWindows": "Os bots não conseguem usar este PC agora. Reinicie o app {app}. Se não resolver, abra Configurações → Este app → Ajuda.",
"computer.problem.localMac": "Os bots ainda não conseguem usar este Mac. Confira se o app {app} tem permissão em Gravação de Tela e Acessibilidade, em Ajustes do Sistema → Privacidade e Segurança, e reinicie o app.",
+ "computer.problem.localMacTooOld": "Os bots não conseguem usar este Mac: o controle local da área de trabalho precisa do macOS 13 Ventura ou posterior. Atualize o macOS para usá-lo.",
"computer.problem.localRemoteServer": "Os bots no seu próprio servidor não conseguem usar este computador. Volte para Este computador para usá-lo.",
"ask.header.asks": "{name} pergunta",
"ask.settled.chose": "Você escolheu:",
diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.json
index 1a561338e4..ac3bbbc0db 100644
--- a/src/locales/source-hashes.json
+++ b/src/locales/source-hashes.json
@@ -4037,7 +4037,8 @@
"imageGen.complexity.help": "b932b5a36319d04701dcf3bc04227e92a9b5db0d3b46ba62a39ddafef1303ac4",
"imageGen.complexity.low": "f793de205ead5ac302c4a1627829dea41f176b1068b993a32373fc869918374b",
"imageGen.complexity.medium": "8e588cd187741f1cd76f5fab77b7208782a8c21d764ce7d7a4cf3ac4e0968873",
- "imageGen.complexity.high": "c4ebc6d4a5832cd9415f906ad03661110c705a72381c8b8b145761d02e2dd23a"
+ "imageGen.complexity.high": "c4ebc6d4a5832cd9415f906ad03661110c705a72381c8b8b145761d02e2dd23a",
+ "computer.problem.localMacTooOld": "bf3b76c9975f9e324731f76a694f19ebab0ef4dad5758b77176547c5953fc9ed"
},
"es": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -36998,7 +36999,8 @@
"imageGen.complexity.help": "b932b5a36319d04701dcf3bc04227e92a9b5db0d3b46ba62a39ddafef1303ac4",
"imageGen.complexity.low": "f793de205ead5ac302c4a1627829dea41f176b1068b993a32373fc869918374b",
"imageGen.complexity.medium": "8e588cd187741f1cd76f5fab77b7208782a8c21d764ce7d7a4cf3ac4e0968873",
- "imageGen.complexity.high": "c4ebc6d4a5832cd9415f906ad03661110c705a72381c8b8b145761d02e2dd23a"
+ "imageGen.complexity.high": "c4ebc6d4a5832cd9415f906ad03661110c705a72381c8b8b145761d02e2dd23a",
+ "computer.problem.localMacTooOld": "bf3b76c9975f9e324731f76a694f19ebab0ef4dad5758b77176547c5953fc9ed"
},
"zh": {
"pro.fromPrice": "a48a04a457d60b08b54fc83e7a6c4584ffedb1e23621859084900c8521a3af7b",