openclaw - ✅(Solved) Fix [Bug]: Bonjour plugin does not wire Ciao cancellation rejection handler, causing unhandled rejection on CIAO PROBING CANCELLED [1 pull requests, 2 comments, 3 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#71869Fetched 2026-04-26 05:07:17
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
1
Author
Timeline (top)
commented ×2labeled ×2closed ×1cross-referenced ×1

OpenClaw 2026.4.24 reports an unhandled promise rejection for CIAO PROBING CANCELLED while the bundled Bonjour plugin contains a Ciao cancellation classifier that is not wired into the advertised runtime call.

Root Cause

OpenClaw 2026.4.24 reports an unhandled promise rejection for CIAO PROBING CANCELLED while the bundled Bonjour plugin contains a Ciao cancellation classifier that is not wired into the advertised runtime call.

Fix Action

Fix / Workaround

A local patch that passes registerUnhandledRejectionHandler into startGatewayBonjourAdvertiser changed the installed bundle from unpatched to patched locally. Last known good and first known bad versions are NOT_ENOUGH_INFO.

PR fix notes

PR #5: fix(bonjour): also suppress CIAO PROBING CANCELLED in rejection handler

Description (problem / solution / changelog)

Summary

ignoreCiaoCancellationRejection only matched \"CIAO ANNOUNCEMENT CANCELLED\". The ciao library also emits \"CIAO PROBING CANCELLED\" during mDNS probing on startup. That string was not matched, so it fell through to the global unhandled rejection handler and killed the gateway process.

This extends the check to cover both variants.

Root Cause

src/infra/bonjour-ciao.ts line 6 had a single includes(\"CIAO ANNOUNCEMENT CANCELLED\") check. The ciao library has two cancellation paths:

  • Announcement phase: CIAO ANNOUNCEMENT CANCELLED
  • Probing phase: CIAO PROBING CANCELLED

Only the first was handled. On affected machines the gateway exits on startup with:

Unhandled promise rejection: CIAO PROBING CANCELLED

Fix

Added CIAO PROBING CANCELLED to the rejection check in ignoreCiaoCancellationRejection. One-line logic change.

Test Plan

  • New test file src/infra/bonjour-ciao.test.ts with 9 tests covering: ANNOUNCEMENT suppressed, PROBING suppressed, case-insensitive matching, unrelated errors not suppressed, debug log fired on suppress, debug log not fired on pass-through
  • All 9 new tests pass
  • All 7 existing src/infra/bonjour.test.ts tests pass unchanged

Closes #71869


Generated by Claude Code

<!-- devin-review-badge-begin -->
<a href="https://app.devin.ai/review/suboss87/openclaw/pull/5" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open in Devin Review"> </picture> </a> <!-- devin-review-badge-end -->

Changed files

  • src/infra/bonjour-ciao.test.ts (added, +49/-0)
  • src/infra/bonjour-ciao.ts (modified, +4/-1)

Code Example

Observed log:


10:07:22 [openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED
10:07:22 [openclaw] wrote stability bundle: /home/<user>/.openclaw/logs/stability/openclaw-stability-2026-04-26T01-07-22-984Z-<pid>-unhandled_rejection.json


Stability bundle excerpt:


{
  "version": 1,
  "generatedAt": "2026-04-26T01:07:22.984Z",
  "reason": "unhandled_rejection",
  "process": {
    "pid": "<pid>",
    "platform": "linux",
    "arch": "x64",
    "node": "25.9.0"
  },
  "host": {
    "hostname": "<hostname>"
  }
}


Installed code evidence:

`dist/extensions/bonjour/index.js` contains:


const CIAO_CANCELLATION_MESSAGE_RE = /^CIAO (?:ANNOUNCEMENT|PROBING) CANCELLED\b/u;
function classifyCiaoUnhandledRejection(reason) { ... }


and:


cleanupUnhandledRejection: services.length > 0 && deps.registerUnhandledRejectionHandler
  ? deps.registerUnhandledRejectionHandler(handleCiaoUnhandledRejection)
  : void 0


but the plugin starts the advertiser with:


startGatewayBonjourAdvertiser(..., { logger: api.logger })


so `deps.registerUnhandledRejectionHandler` is not passed.
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

OpenClaw 2026.4.24 reports an unhandled promise rejection for CIAO PROBING CANCELLED while the bundled Bonjour plugin contains a Ciao cancellation classifier that is not wired into the advertised runtime call.

Steps to reproduce

  1. Start the OpenClaw gateway on the affected machine.
  2. Observe that the gateway exits shortly after startup.
  3. Run OpenClaw doctor / repair checks and start the gateway again.
  4. Observe that the gateway still exits and logs Unhandled promise rejection: CIAO PROBING CANCELLED.

Expected behavior

The bundled Bonjour plugin contains CIAO_CANCELLATION_MESSAGE_RE and handleCiaoUnhandledRejection, so CIAO PROBING CANCELLED should be handled by the registered unhandled rejection suppression path instead of reaching the global unhandled rejection handler.

Actual behavior

OpenClaw logged Unhandled promise rejection: CIAO PROBING CANCELLED and wrote a stability bundle under /home/<user>/.openclaw/logs/stability/...-unhandled_rejection.json.

The installed Bonjour plugin calls startGatewayBonjourAdvertiser(..., { logger: api.logger }), so deps.registerUnhandledRejectionHandler is not provided.

OpenClaw version

2026.4.24

Operating system

Ubuntu 24.04.4 LTS, Linux 6.17.0-22-generic x86_64

Install method

npm global install path: /home/<user>/.npm-global/lib/node_modules/openclaw CLI path: /home/<user>/.local/bin/openclaw Node.js: v25.9.0 npm: 11.12.1

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Observed log:


10:07:22 [openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED
10:07:22 [openclaw] wrote stability bundle: /home/<user>/.openclaw/logs/stability/openclaw-stability-2026-04-26T01-07-22-984Z-<pid>-unhandled_rejection.json


Stability bundle excerpt:


{
  "version": 1,
  "generatedAt": "2026-04-26T01:07:22.984Z",
  "reason": "unhandled_rejection",
  "process": {
    "pid": "<pid>",
    "platform": "linux",
    "arch": "x64",
    "node": "25.9.0"
  },
  "host": {
    "hostname": "<hostname>"
  }
}


Installed code evidence:

`dist/extensions/bonjour/index.js` contains:


const CIAO_CANCELLATION_MESSAGE_RE = /^CIAO (?:ANNOUNCEMENT|PROBING) CANCELLED\b/u;
function classifyCiaoUnhandledRejection(reason) { ... }


and:


cleanupUnhandledRejection: services.length > 0 && deps.registerUnhandledRejectionHandler
  ? deps.registerUnhandledRejectionHandler(handleCiaoUnhandledRejection)
  : void 0


but the plugin starts the advertiser with:


startGatewayBonjourAdvertiser(..., { logger: api.logger })


so `deps.registerUnhandledRejectionHandler` is not passed.

Impact and severity

Affected users/systems/channels: OpenClaw gateway on the affected Linux machine. Severity: blocks gateway startup on the affected machine. Frequency: repeated after gateway restart and doctor checks on the affected machine. Consequence: gateway exits before it can remain running.

Additional information

A local patch that passes registerUnhandledRejectionHandler into startGatewayBonjourAdvertiser changed the installed bundle from unpatched to patched locally. Last known good and first known bad versions are NOT_ENOUGH_INFO.

extent analysis

TL;DR

Pass deps.registerUnhandledRejectionHandler to startGatewayBonjourAdvertiser to handle the CIAO PROBING CANCELLED promise rejection.

Guidance

  • The CIAO PROBING CANCELLED promise rejection is not being handled because deps.registerUnhandledRejectionHandler is not being passed to startGatewayBonjourAdvertiser.
  • To fix this, update the startGatewayBonjourAdvertiser call to include deps.registerUnhandledRejectionHandler, like this: startGatewayBonjourAdvertiser(..., { logger: api.logger, registerUnhandledRejectionHandler: deps.registerUnhandledRejectionHandler }).
  • Verify that the gateway no longer exits with an unhandled promise rejection error after making this change.
  • Check the stability bundle logs to ensure that the CIAO PROBING CANCELLED error is no longer being written.

Example

startGatewayBonjourAdvertiser(..., { 
  logger: api.logger, 
  registerUnhandledRejectionHandler: deps.registerUnhandledRejectionHandler 
})

Notes

The provided local patch that passes registerUnhandledRejectionHandler into startGatewayBonjourAdvertiser suggests that this change should resolve the issue, but without more information about the last known good and first known bad versions, it's difficult to say for certain.

Recommendation

Apply the workaround by passing deps.registerUnhandledRejectionHandler to startGatewayBonjourAdvertiser, as this has been shown to resolve the issue in the local patch.

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

The bundled Bonjour plugin contains CIAO_CANCELLATION_MESSAGE_RE and handleCiaoUnhandledRejection, so CIAO PROBING CANCELLED should be handled by the registered unhandled rejection suppression path instead of reaching the global unhandled rejection handler.

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 - ✅(Solved) Fix [Bug]: Bonjour plugin does not wire Ciao cancellation rejection handler, causing unhandled rejection on CIAO PROBING CANCELLED [1 pull requests, 2 comments, 3 participants]