-
-
Notifications
You must be signed in to change notification settings - Fork 69.4k
macOS app crash in MacNodeBrowserProxy.makeRequest (JSON serialization, beta 2026.3.8) #42287
Description
Environment
- App version: 2026.3.8-beta.1 (2026030801)
- macOS: 26.2 (25C56)
- Hardware: Mac mini (Mac16,11), ARM-64
- Gateway: Remote mode, Direct (ws/wss) transport
- Gateway version: 2026.3.7
Description
The macOS companion app crashes approximately 20 minutes after successfully connecting to a remote gateway in Direct (ws/wss) mode. The crash occurs when the gateway sends a browser proxy invoke request to the macOS node.
The crash is in MacNodeBrowserProxy.makeRequest(params:endpoint:) when it attempts to serialize parameters to JSON via NSJSONSerialization.dataWithJSONObject:options:error:. An invalid value in the dictionary causes _writeJSONValue to throw an exception, which propagates as an uncaught objc_exception_throw → SIGABRT.
Crash Stack (key frames)
Exception Type: EXC_CRASH (SIGABRT)
Termination Reason: Namespace SIGNAL, Code 6, Abort trap: 6
Last Exception Backtrace:
0 CoreFoundation __exceptionPreprocess + 164
1 libobjc.A.dylib objc_exception_throw + 88
2 Foundation _writeJSONValue + 788
3 Foundation ___writeJSONObject_block_invoke + 412
4 libswiftCore.dylib specialized _SwiftDeferredNSDictionary.enumerateKeysAndObjects + 1088
...
9 OpenClaw static MacNodeBrowserProxy.makeRequest(params:endpoint:) + 4296
10 OpenClaw MacNodeBrowserProxy.request(paramsJSON:) + 120
11 OpenClaw MacNodeRuntime.handleBrowserProxyInvoke(_:) + 1
12 OpenClaw MacNodeRuntime.handleInvoke(_:) + 1
13 OpenClaw closure #4 in MacNodeModeCoordinator.run() + 1
...
16 OpenClaw GatewayNodeSession.invokeWithTimeout(request:timeoutMs:onInvoke:) + 1
Steps to Reproduce
- Install macOS app, configure Remote mode with Direct (ws/wss) transport
- Connect to a remote gateway (Docker container on Linux server via SSH tunnel)
- Successfully pair the device (
openclaw devices approve) - App connects and shows green status, control channel connected (~40ms ping)
- After ~20 minutes, app crashes with SIGABRT
Workaround
Disabling Browser Control in the macOS app menu prevents the crash, since the gateway won't send browser proxy invokes to the node.
Suggested Fix
The params dictionary passed to NSJSONSerialization likely contains a value type that isn't JSON-serializable (e.g., Data, a custom object, or nil bridged from Swift optional). Adding a validation pass or using JSONEncoder with proper Codable conformance in MacNodeBrowserProxy.makeRequest would prevent the crash.
Full Crash Report
Available on request (includes all threads and binary images).