openclaw - 💡(How to fix) Fix fix(bonjour): crash loop — unhandled 'CIAO ANNOUNCEMENT/PROBING CANCELLED' rejection [4 comments, 5 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#72089Fetched 2026-04-27 05:35:01
View on GitHub
Comments
4
Participants
5
Timeline
10
Reactions
0
Author
Timeline (top)
commented ×4cross-referenced ×3subscribed ×2closed ×1

Root Cause

extensions/bonjour/src/index.ts tries to register an unhandled-rejection handler for @homebridge/ciao but:

  1. @homebridge/ciao is missing from package.json optionalDependencies
  2. deps.registerUnhandledRejectionHandler is undefined (only { logger } is passed), so the handler is never registered

When @homebridge/ciao emits cancellation events, they crash the event loop.

Code Example

[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
[openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED
RAW_BUFFERClick to expand / collapse

Bug Description

OpenClaw Gateway crashes every 40–60 seconds with an unhandled promise rejection:

[openclaw] Unhandled promise rejection: CIAO ANNOUNCEMENT CANCELLED
[openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED

A stability bundle is written on each crash: ~/.openclaw/logs/stability/openclaw-stability-YYYY-MM-DD...-unhandled_rejection.json

This renders the gateway practically unusable for continuous operation.

Environment

  • OpenClaw version: latest from npm (npm i -g openclaw)
  • Platform: Linux (x64)
  • Node version: 18+
  • Gateway config: standard, with bonjour discovery enabled (default)

Root Cause

extensions/bonjour/src/index.ts tries to register an unhandled-rejection handler for @homebridge/ciao but:

  1. @homebridge/ciao is missing from package.json optionalDependencies
  2. deps.registerUnhandledRejectionHandler is undefined (only { logger } is passed), so the handler is never registered

When @homebridge/ciao emits cancellation events, they crash the event loop.

Steps to Reproduce

  1. npm i -g openclaw
  2. openclaw-gateway
  3. Wait 40–60 seconds
  4. Observe crash + stability bundle

Suggested Fix

  • Add @homebridge/ciao@^1.3.6 to optionalDependencies
  • Import registerUnhandledRejectionHandler directly and use it (no deps.) when services.length > 0

I can provide a PR with these changes if maintainers are interested.

extent analysis

TL;DR

Add @homebridge/ciao to optionalDependencies and import registerUnhandledRejectionHandler directly to fix the unhandled promise rejection issue.

Guidance

  • Verify that @homebridge/ciao is not already included in optionalDependencies by checking the package.json file.
  • Import registerUnhandledRejectionHandler directly in extensions/bonjour/src/index.ts and use it when services.length > 0 to handle promise rejections.
  • Test the changes by running openclaw-gateway and waiting 40-60 seconds to see if the crash is resolved.
  • Review the stability bundles in ~/.openclaw/logs/stability/ to ensure no new unhandled rejections occur.

Example

import { registerUnhandledRejectionHandler } from '@homebridge/ciao';

// ...

if (services.length > 0) {
  registerUnhandledRejectionHandler((reason) => {
    // Handle the promise rejection
  });
}

Notes

The suggested fix assumes that the issue is caused by the missing @homebridge/ciao dependency and the incorrect usage of deps.registerUnhandledRejectionHandler. If the issue persists after applying the fix, further debugging may be required.

Recommendation

Apply the workaround by adding @homebridge/ciao to optionalDependencies and importing registerUnhandledRejectionHandler directly, as this is a targeted fix for the identified 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 fix(bonjour): crash loop — unhandled 'CIAO ANNOUNCEMENT/PROBING CANCELLED' rejection [4 comments, 5 participants]