Skip to content

[Bug]: MacNodeBrowserProxy crash on JSON serialization (2026.3.8-beta.1) #44600

@w154119-dotcom

Description

@w154119-dotcom

Bug Report

Version: OpenClaw Mac App 2026.3.8-beta.1 (Build 2026030801)
Platform: macOS 26.3.1 (25D2128), Mac16,12 (MacBook Air M4), ARM-64
Severity: Critical — App crashes immediately on launch

Description

The OpenClaw Mac App (Node mode) crashes repeatedly with SIGABRT when processing a browser proxy invoke from the Gateway. The crash is 100% reproducible — the app crashes within ~3 seconds of launching.

Crash Stack Trace (Key Frames)

Thread 6 Crashed (com.apple.root.default-qos.cooperative):

Exception Type: EXC_CRASH (SIGABRT)
Termination Reason: Namespace SIGNAL, Code 6, Abort trap: 6

Last Exception Backtrace:
  Foundation    +[NSJSONSerialization dataWithJSONObject:options:error:]
  OpenClaw      static MacNodeBrowserProxy.makeRequest(params:endpoint:) + 4296
  OpenClaw      MacNodeBrowserProxy.request(paramsJSON:) + 120
  OpenClaw      MacNodeRuntime.handleBrowserProxyInvoke(_:)
  OpenClaw      MacNodeRuntime.handleInvoke(_:)
  OpenClaw      closure #4 in MacNodeModeCoordinator.run()
  OpenClaw      GatewayNodeSession.invokeWithTimeout(request:timeoutMs:onInvoke:)

Root Cause Analysis

MacNodeBrowserProxy.makeRequest(params:endpoint:) constructs a Swift Dictionary that gets bridged to NSDictionary and passed to NSJSONSerialization.dataWithJSONObject. The dictionary contains a value that is not a valid JSON type (likely nil, an unbridgeable Swift enum/struct, or a non-serializable type), causing _writeJSONValue to throw an NSInvalidArgumentException.

The exception is not caught, propagating through:

  1. _SwiftDeferredNSDictionary.enumerateKeysAndObjects — iterating dict entries
  2. _writeJSONValue — fails on invalid value
  3. objc_exception_throw__cxa_throwstd::__terminateabort()

Suggested Fix

Either:

  1. Validate/sanitize the params dictionary before JSON serialization (filter out nil/non-JSON values)
  2. Wrap NSJSONSerialization call in do-catch and return an error response instead of crashing
  3. Use JSONSerialization.isValidJSONObject() as a pre-check

Steps to Reproduce

  1. Install OpenClaw Mac App 2026.3.8-beta.1 on a Mac
  2. Pair with a Gateway as a Node
  3. Gateway sends a browser proxy invoke
  4. App crashes within 3 seconds of connecting

Environment

  • Hardware: MacBook Air M4 (Mac16,12)
  • OS: macOS 26.3.1 (25D2128)
  • OpenClaw: 2026.3.8-beta.1 (2026030801)
  • SIP: enabled
  • Incident ID: D0672842-527D-4E83-A3D6-E5EF9A46308E

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