Skip to content

[v2026.4.24] Gateway crash loop: CIAO ANNOUNCEMENT CANCELLED in [plugins] bonjour #71771

@spartoviMD

Description

@spartoviMD

Summary

After upgrading from 2026.4.23 to 2026.4.24 (commit cbcfdf6) via npm i -g openclaw (manual-update), the gateway entered a tight crash loop with an unhandled promise rejection from the bonjour mDNS advertiser. Crashes occurred roughly every ~16 seconds. Downgrading to 2026.4.23 (commit a979721) immediately restored stability.

Environment

  • OpenClaw version: 2026.4.24 (commit cbcfdf6)
  • Last known good: 2026.4.23 (commit a979721)
  • macOS Darwin 25.3.0, Apple Silicon Mac mini (arm64)
  • Node.js v24.14.0
  • Install: npm i -g openclaw

Symptom (~/.openclaw/logs/gateway.err.log)

Repeating every ~16 seconds, with the "stuck in announcing" duration consistently in the 8000–8300 ms range:

[plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=<host>._openclaw-gw._tcp.local. host=<host>.local. port=18789 state=probing)
[plugins] bonjour: restarting advertiser (service stuck in announcing for 8214ms (gateway fqdn=<host>._openclaw-gw._tcp.local. host=<host>.local. port=18789 state=announcing))
[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
[openclaw] wrote stability bundle: /Users/<user>/.openclaw/logs/stability/openclaw-stability-2026-04-25T20-49-21-318Z-13305-unhandled_rejection.json

13+ stability bundles dropped in ~4 minutes before I downgraded. Each one matched the same unhandled_rejection shape.

Root-cause hypothesis

The bonjour watchdog forcibly restarts the CIAO advertiser when the service stays in announcing state past ~8000 ms. CIAO appears to surface that cancellation as a rejected promise that no code is awaiting; the rejection escapes as unhandled and brings the gateway down. Launchd restarts the gateway and the loop repeats.

Two angles worth checking:

  1. The CIAO advertiser cancel path needs .catch() (or to be awaited inside a try/catch) so cancellation cannot escape as an unhandled rejection.
  2. The ~8000ms "stuck in announcing" watchdog threshold may be too tight for the Bonjour state machine on macOS Sequoia / arm64 — every cycle hit it. v23 emits the same watchdog detected non-announced service warning but does not throw, so the trigger condition existed before; what changed in v24 is that the cancellation now leaks.

Stability bundle excerpt

{
  "version": 1,
  "reason": "unhandled_rejection",
  "process": {
    "pid": 13305, "platform": "darwin", "arch": "arm64",
    "node": "24.14.0", "uptimeMs": 16523
  }
}

(events array was empty in the bundle — no captured trace beyond the reason. Happy to attach raw bundles if useful.)

Impact

Gateway unavailable; the entire stack depending on it (in my case an email bridge driving an agent on every inbound mail) is down until manual intervention.

Workaround

npm i -g openclaw@2026.4.23
openclaw doctor --fix

Stack returns to stable in seconds. Note that v24 added plugins.entries.feishu and plugins.entries.whatsapp which require >=2026.4.24; doctor --fix cleans those out of openclaw.json so v23 can boot cleanly.

Asks

  1. Catch the CIAO cancellation rejection at the source (or change the watchdog to await its own cancel call so it can swallow the reject).
  2. Consider raising the watchdog threshold or backing off when the Bonjour state machine is consistently hitting the ceiling on a given platform — the warning was already firing on v23 every few minutes; a watchdog that fires that often probably indicates the threshold is wrong for the host.
  3. Once shipped, would also unblock the workaround removal that I am holding for openclaw agent / openclaw infer CLI processes don't exit; MCP stdio server children orphaned and accumulating (~66 MB each) #71457 — I cannot upgrade to act on the openclaw agent / openclaw infer CLI processes don't exit; MCP stdio server children orphaned and accumulating (~66 MB each) #71457 fix until the bonjour regression is resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dedupe:childDuplicate issue/PR child in dedupe clusterduplicateThis issue or pull request already exists

    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