openclaw - 💡(How to fix) Fix [Bug] Gateway crashes with unhandled 'CIAO ANNOUNCEMENT CANCELLED' promise rejection during Bonjour restart [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74039Fetched 2026-04-30 06:29:31
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
closed ×1commented ×1cross-referenced ×1

Error Message

console.warn('Bonjour announcement cancelled, ignoring:', err);

Code Example

[bonjour] restarting advertiser (service stuck in announcing for 10051ms)
[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
[openclaw] wrote stability bundle: .../openclaw-stability-...json

---

// Example fix pattern:
promise.catch(err => {
  if (err.message === 'CIAO ANNOUNCEMENT CANCELLED') {
    console.warn('Bonjour announcement cancelled, ignoring:', err);
    return; // don't crash
  }
  throw err;
});
RAW_BUFFERClick to expand / collapse

Bug Description

Gateway crashes with an unhandled Promise rejection: CIAO ANNOUNCEMENT CANCELLED when Bonjour advertiser gets stuck in announcing state and is restarted.

Steps to Reproduce

  1. Have Bonjour/mDNS service running
  2. Gateway starts normally
  3. After some time, Bonjour advertiser gets stuck in announcing state (observed at ~10s delay)
  4. When OpenClaw tries to restart the advertiser, it throws an unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
  5. This causes the Gateway process to crash and restart automatically
  6. On restart, Bonjour may get stuck again → crash loop

Expected Behavior

The promise rejection should be caught and handled gracefully, not crash the entire Gateway process.

Log Evidence

[bonjour] restarting advertiser (service stuck in announcing for 10051ms)
[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
[openclaw] wrote stability bundle: .../openclaw-stability-...json

Version

  • OpenClaw: 2026.4.24 (cbcfdf6)
  • Node.js: v24.13.1
  • OS: macOS (Darwin)

Suggested Fix

Wrap the Bonjour advertiser restart logic in a try/catch or attach a .catch() handler to the promise that rejects with CIAO ANNOUNCEMENT CANCELLED.

// Example fix pattern:
promise.catch(err => {
  if (err.message === 'CIAO ANNOUNCEMENT CANCELLED') {
    console.warn('Bonjour announcement cancelled, ignoring:', err);
    return; // don't crash
  }
  throw err;
});

Impact

  • Causes repeated Gateway crashes (crash loop 3-5 times before stabilizing)
  • Disrupts all active sessions and Cron jobs
  • Affects reliability of automated tasks

Submitted via OpenClaw CLI

extent analysis

TL;DR

Wrap the Bonjour advertiser restart logic in a try/catch or attach a .catch() handler to the promise that rejects with CIAO ANNOUNCEMENT CANCELLED to prevent Gateway crashes.

Guidance

  • Identify the specific promise that is rejecting with CIAO ANNOUNCEMENT CANCELLED and attach a .catch() handler to it.
  • Implement a try/catch block around the Bonjour advertiser restart logic to catch and handle any errors that occur.
  • Verify that the .catch() handler or try/catch block is correctly handling the error and preventing the Gateway from crashing.
  • Test the fix by simulating the conditions that cause the Bonjour advertiser to get stuck in the announcing state and verifying that the Gateway no longer crashes.

Example

promise.catch(err => {
  if (err.message === 'CIAO ANNOUNCEMENT CANCELLED') {
    console.warn('Bonjour announcement cancelled, ignoring:', err);
    return; // don't crash
  }
  throw err;
});

Notes

This fix assumes that the CIAO ANNOUNCEMENT CANCELLED error is the only error that needs to be handled. If other errors can occur, additional error handling may be necessary.

Recommendation

Apply workaround: Attach a .catch() handler to the promise that rejects with CIAO ANNOUNCEMENT CANCELLED to prevent Gateway crashes, as this is a targeted fix that addresses the specific error causing the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] Gateway crashes with unhandled 'CIAO ANNOUNCEMENT CANCELLED' promise rejection during Bonjour restart [1 comments, 2 participants]