Skip to content

macOS app crash in MacNodeBrowserProxy.makeRequest (JSON serialization, beta 2026.3.8) #42287

@CarSol66

Description

@CarSol66

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_throwSIGABRT.

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

  1. Install macOS app, configure Remote mode with Direct (ws/wss) transport
  2. Connect to a remote gateway (Docker container on Linux server via SSH tunnel)
  3. Successfully pair the device (openclaw devices approve)
  4. App connects and shows green status, control channel connected (~40ms ping)
  5. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions