Skip to content

[Bug] macOS App 2026.2.17 Causes Gateway Crash & Setup Loop (Config Overwrite + Token Mismatch) #20189

Closed

Description

@IanxDev

After upgrading both the OpenClaw Gateway (CLI) and the macOS App to version 2026.2.17, the macOS App fails to detect the existing, running Gateway. Instead, it forces a "Setup Wizard" flow which appears to overwrite the existing openclaw.json configuration, leading to a token mismatch loop and eventually causing the Gateway process to crash with an unhandled exception.

To Reproduce

  1. Have a working OpenClaw setup (CLI + App) on a previous version (e.g., 2026.2.15).
  2. Upgrade CLI to 2026.2.17 via npm/yarn.
  3. Upgrade macOS App to 2026.2.17.
  4. Launch the macOS App.
  5. Observation 1: The App does not connect to the existing Gateway; prompts to run Setup.
  6. Observation 2: The Gateway process (CLI) crashes shortly after the App is opened.

Expected behavior
The macOS App should detect the existing ~/.openclaw/openclaw.json configuration and connect to the local Gateway using the existing token without forcing a new setup or modifying the config file.

Logs & Evidence
From gateway.err.log and gateway.log:

  1. Config Overwrite Loop: The App appears to be writing to openclaw.json immediately upon launch, invalidating the previous token.

    2026-02-18T23:16:59.422+08:00 Config overwrite: .../openclaw.json (sha256 ... -> ...)
    2026-02-18T23:16:59.776+08:00 Config overwrite: .../openclaw.json (sha256 ... -> ...)
    2026-02-18T15:16:59.945Z [reload] config change requires gateway restart (gateway.auth)
    
  2. Token Mismatch: The App tries to connect but is rejected because the Gateway (after restart) or the App itself has desynchronized credentials.

    reason=unauthorized: gateway token mismatch
    
  3. Gateway Crash: The Gateway crashes due to an unhandled rejection in the connection logic during this race condition.

    [openclaw] Uncaught exception: Error: Max reconnect attempts (0) reached after code 1006
        at GatewayPlugin.handleReconnectionAttempt ...
        at GatewayPlugin.handleClose ...
    

Environment:

  • OS: macOS 26.2
  • OpenClaw CLI Version: 2026.2.17
  • OpenClaw App Version: 2026.2.17
  • Node Version: v22.x

Workaround / Fix
Downgrading only the macOS App to the previous version (e.g., 2026.2.15) while keeping the CLI at 2026.2.17 resolves the issue. The older App version correctly connects to the new Gateway without triggering the setup loop or config overwrite.

Activity

  1. openclaw-barnacle commented on Feb 26, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  2. added
    stale
    on Feb 26, 2026
  3. locked as resolved and limited conversation to collaborators on Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions