openclaw - 💡(How to fix) Fix [Bug]:Gateway crash loop: Unhandled promise rejection from Bonjour/ciao mDNS advertiser [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#73074Fetched 2026-04-28 06:27:50
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Participants
Assignees
Timeline (top)
labeled ×2assigned ×1closed ×1commented ×1

The Bonjour mDNS advertiser gets stuck in "announcing" state after a network change, causing an unhandled promise rejection that crashes the gateway in an infinite restart loop.

Root Cause

The Bonjour mDNS advertiser gets stuck in "announcing" state after a network change, causing an unhandled promise rejection that crashes the gateway in an infinite restart loop.

Code Example

## Crash Loop Log (sample — repeated 1,932 times over ~14 hours)

2026-04-27T19:34:00.522+10:00 (node:25450) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
2026-04-27T19:34:00.731+10:00 [gateway] security warning: dangerous config flags enabled: browser.ssrfPolicy.dangerouslyAllowPrivateNetwork=true.
2026-04-27T19:34:05.849+10:00 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=openclaw's Mac mini._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
2026-04-27T19:34:18.211+10:00 [plugins] bonjour: restarting advertiser (service stuck in announcing for 12363ms (gateway fqdn=openclaw's Mac mini._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing))
2026-04-27T19:34:18.212+10:00 [openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
2026-04-27T19:34:18.214+10:00 [openclaw] wrote stability bundle: /Users/openclaw/.openclaw/logs/stability/openclaw-stability-2026-04-27T09-34-18-213Z-25450-unhandled_rejection.json
2026-04-27T19:34:21.050+10:00 (node:25512) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
2026-04-27T19:34:21.247+10:00 [gateway] security warning: dangerous config flags enabled: browser.ssrfPolicy.dangerouslyAllowPrivateNetwork=true.
2026-04-27T19:34:26.475+10:00 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=openclaw's Mac mini._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
2026-04-27T19:34:38.594+10:00 [plugins] bonjour: restarting advertiser (service stuck in announcing for 12120ms (... state=announcing))
2026-04-27T19:34:38.595+10:00 [openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
2026-04-27T19:34:38.596+10:00 [openclaw] wrote stability bundle: ...unhandled_rejection.json

... (cycle repeats every ~20 seconds for 14 hours)

2026-04-28T05:48:03.351+10:00 [telegram] deleteWebhook failed: Network request for 'deleteWebhook' failed!
2026-04-28T05:49:50.977+10:00 [telegram] sendChatAction failed: Network request for 'sendChatAction' failed!
2026-04-28T05:49:54.728+10:00 [telegram] editMessage failed: Network request for 'editMessageText' failed!

## Total: 1,932 unhandled rejection crashes in gateway.err.log
## Duration: 2026-04-27 15:32 AEST2026-04-28 05:48 AEST (~14 hours)
## Stability bundles written: 22 files in ~/.openclaw/logs/stability/
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

The Bonjour mDNS advertiser gets stuck in "announcing" state after a network change, causing an unhandled promise rejection that crashes the gateway in an infinite restart loop.

Steps to reproduce

  1. Run OpenClaw gateway on macOS with Bonjour enabled
  2. Change the network environment (e.g. move machine to a new router/network)
  3. Bonjour advertiser gets stuck in "announcing" state on the new network
  4. Gateway enters crash-restart loop every ~20 seconds with "CIAO ANNOUNCEMENT CANCELLED"

Expected behavior

An unhandled promise rejection from the mDNS library should not crash the gateway process. The Bonjour advertiser should gracefully recover from a stale announcement state, or the rejection should be caught and logged without taking down the entire process.

Actual behavior

The gateway crashes and restarts every ~20 seconds in an infinite loop. Logs show: "bonjour: restarting advertiser (service stuck in announcing for 12XXXms)" followed by "Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED". This repeated 1,932 times over ~14 hours. The gateway was completely unresponsive to all channels (Telegram, etc.) for the entire duration. Manual restart was required to recover.

OpenClaw version

2026.4.24 (cbcfdf6) — also reproduced on 2026.4.25 (aa36ee6)

Operating system

macOS Darwin 25.4.0 (arm64)

Install method

npm (global install)

Model

openrouter/xiaomi/mimo-v2.5-pro

Provider / routing chain

OpenRouter → xiaomi/mimo-v2.5-pro

Additional provider/model setup details

No response

Logs, screenshots, and evidence

## Crash Loop Log (sample — repeated 1,932 times over ~14 hours)

2026-04-27T19:34:00.522+10:00 (node:25450) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
2026-04-27T19:34:00.731+10:00 [gateway] security warning: dangerous config flags enabled: browser.ssrfPolicy.dangerouslyAllowPrivateNetwork=true.
2026-04-27T19:34:05.849+10:00 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=openclaw's Mac mini._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
2026-04-27T19:34:18.211+10:00 [plugins] bonjour: restarting advertiser (service stuck in announcing for 12363ms (gateway fqdn=openclaw's Mac mini._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=announcing))
2026-04-27T19:34:18.212+10:00 [openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
2026-04-27T19:34:18.214+10:00 [openclaw] wrote stability bundle: /Users/openclaw/.openclaw/logs/stability/openclaw-stability-2026-04-27T09-34-18-213Z-25450-unhandled_rejection.json
2026-04-27T19:34:21.050+10:00 (node:25512) [DEP0040] DeprecationWarning: The `punycode` module is deprecated.
2026-04-27T19:34:21.247+10:00 [gateway] security warning: dangerous config flags enabled: browser.ssrfPolicy.dangerouslyAllowPrivateNetwork=true.
2026-04-27T19:34:26.475+10:00 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=openclaw's Mac mini._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
2026-04-27T19:34:38.594+10:00 [plugins] bonjour: restarting advertiser (service stuck in announcing for 12120ms (... state=announcing))
2026-04-27T19:34:38.595+10:00 [openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
2026-04-27T19:34:38.596+10:00 [openclaw] wrote stability bundle: ...unhandled_rejection.json

... (cycle repeats every ~20 seconds for 14 hours)

2026-04-28T05:48:03.351+10:00 [telegram] deleteWebhook failed: Network request for 'deleteWebhook' failed!
2026-04-28T05:49:50.977+10:00 [telegram] sendChatAction failed: Network request for 'sendChatAction' failed!
2026-04-28T05:49:54.728+10:00 [telegram] editMessage failed: Network request for 'editMessageText' failed!

## Total: 1,932 unhandled rejection crashes in gateway.err.log
## Duration: 2026-04-27 15:32 AEST → 2026-04-28 05:48 AEST (~14 hours)
## Stability bundles written: 22 files in ~/.openclaw/logs/stability/

Impact and severity

  • Affected: All channels (Telegram group chat, cron jobs, LLM calls) — gateway completely unresponsive
  • Severity: Blocks workflow — no messages received or sent for 14 hours
  • Frequency: Triggered by network environment change (moving the machine to a new network). Reproducible.
  • Consequence: Missed messages from team members for 14+ hours. Cron jobs executed but LLM calls failed due to constant process cycling. Required manual intervention (reboot) to recover.

Additional information

No response

extent analysis

TL;DR

The Bonjour mDNS advertiser getting stuck in the "announcing" state after a network change is likely causing the unhandled promise rejection that leads to the gateway crash and restart loop.

Guidance

  • Investigate the mDNS library: Review the mDNS library used by the OpenClaw gateway to understand how it handles network changes and announcement states.
  • Implement promise rejection handling: Modify the code to catch and log the promise rejection instead of letting it crash the gateway process.
  • Add a retry mechanism: Introduce a retry mechanism for the Bonjour advertiser to recover from a stale announcement state.
  • Monitor network changes: Develop a way to detect network changes and trigger a restart of the Bonjour advertiser to prevent it from getting stuck.

Example

// Pseudo-code example of catching promise rejection
bonjourAdvertiser.start()
  .catch((error) => {
    console.error('Bonjour advertiser error:', error);
    // Log the error and potentially restart the advertiser
  });

Notes

The provided log snippet indicates a deprecation warning for the punycode module, but it's unclear if this is related to the issue at hand. Further investigation into the mDNS library and the OpenClaw gateway code is necessary to determine the root cause.

Recommendation

Apply a workaround by implementing promise rejection handling and a retry mechanism for the Bonjour advertiser, as the root cause of the issue is likely related to the mDNS library's handling of network changes.

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…

FAQ

Expected behavior

An unhandled promise rejection from the mDNS library should not crash the gateway process. The Bonjour advertiser should gracefully recover from a stale announcement state, or the rejection should be caught and logged without taking down the entire process.

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 crash loop: Unhandled promise rejection from Bonjour/ciao mDNS advertiser [1 comments, 2 participants]