Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(spaces): tell VPN users how to keep their VPN on when it blocks a macOS Space (#6262)

cua-agents[bot]29c1f756971f
diff --git a/libs/cua/crates/cua-create-failure/src/preflight.rs b/libs/cua/crates/cua-create-failure/src/preflight.rs
index b4b9ddb949..390e8bae13 100644
--- a/libs/cua/crates/cua-create-failure/src/preflight.rs
+++ b/libs/cua/crates/cua-create-failure/src/preflight.rs
@@ -209,7 +209,9 @@ pub fn local_network_denied(app: &str) -> String {
/// The sentence for a Mac whose VPN or firewall blocks its own VM network
/// while Local Network access is on.
pub const LOCAL_NETWORK_VPN: &str = "A VPN or firewall is blocking this Mac's own network, so \
- Cua Spaces can't connect to macOS Spaces. Turn off the VPN and try again.";
+ Cua Spaces can't connect to macOS Spaces. Turn off the VPN and try again. If you can't turn \
+ it off, ask whoever manages it (often your IT team) to let 192.168.64.0/24, the network \
+ macOS Spaces use on this Mac, skip the VPN.";
/// A System Settings page or Windows dialog a fix opens.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)]
@@ -554,6 +556,8 @@ mod tests {
let i = first(&req(Host::Macos, Guest::Macos, Runs::Vm), &facts);
assert_eq!(i.kind, IssueKind::LocalNetworkVpn);
assert!(i.message.contains("Turn off the VPN"), "{}", i.message);
+ // A work VPN often can't be turned off: say what to ask for instead.
+ assert!(i.message.contains("192.168.64.0/24"), "{}", i.message);
assert!(i.fix.is_none());
assert_eq!(i.kind.error_kind(), "local_network");
assert_eq!(i.kind.error_subclass(), Some("local_network_vpn"));
diff --git a/libs/cua/crates/cua-spaces-app-core/src/spaces/creating.rs b/libs/cua/crates/cua-spaces-app-core/src/spaces/creating.rs
index 6dff2397bd..5db5ec65fd 100644
--- a/libs/cua/crates/cua-spaces-app-core/src/spaces/creating.rs
+++ b/libs/cua/crates/cua-spaces-app-core/src/spaces/creating.rs
@@ -1577,7 +1577,9 @@ pub fn power_failed_text(on: bool, error: &str) -> String {
)
}
Some(FailureCause::LocalNetworkVpn) => "a VPN or firewall on the Mac running it is \
- blocking that Mac's own network. Turn off the VPN there and try again."
+ blocking that Mac's own network. Turn off the VPN there and try again. If it can't be \
+ turned off, ask whoever manages it to let 192.168.64.0/24 (that Mac's VM network) \
+ skip the VPN."
.into(),
Some(FailureCause::Disk) => "there isn't enough disk space on the Mac running it. Free \
up space there (or run `cua cache prune` in Terminal), then try again."
@@ -1619,7 +1621,8 @@ fn vpn_text(provider: Option<SpaceProvider>, host_name: Option<&str>) -> String
}
format!(
"A VPN or firewall on {subject} is blocking that Mac's own network, so it can't connect \
- to its new macOS Space. Turn off the VPN there and try again."
+ to its new macOS Space. Turn off the VPN there and try again. If it can't be turned off, ask \
+ whoever manages it to let 192.168.64.0/24 (that Mac's VM network) skip the VPN."
)
}