openclaw - ✅(Solved) Fix [Bug]: Docker container crashes on 4.24 due to [openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED [1 pull requests, 3 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#71751Fetched 2026-04-26 05:08:51
View on GitHub
Comments
3
Participants
2
Timeline
10
Reactions
0
Author
Participants
Timeline (top)
commented ×3cross-referenced ×2labeled ×2closed ×1

2026-04-25T20:14:47.695+00:00 [openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED 2026-04-25T20:14:47.700+00:00 [openclaw] wrote stability bundle: /home/node/.openclaw/logs/stability/openclaw-stability-2026-04-25T20-14-47-698Z-7-unhandled_rejection.json

Root Cause

2026-04-25T20:14:47.695+00:00 [openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED 2026-04-25T20:14:47.700+00:00 [openclaw] wrote stability bundle: /home/node/.openclaw/logs/stability/openclaw-stability-2026-04-25T20-14-47-698Z-7-unhandled_rejection.json

Fix Action

Fixed

PR fix notes

PR #71754: fix(bonjour): register ciao unhandled-rejection handler before service creation

Description (problem / solution / changelog)

Summary

Fixes #71751. The Docker container crashes on 2026.4.23 (and 2026.4.24) with:

[openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED
[openclaw] wrote stability bundle: …openclaw-stability-…-unhandled_rejection.json

…immediately followed by a process exit.

Root cause

startGatewayBonjourAdvertiser already has the right machinery — classifyCiaoUnhandledRejection recognizes both CIAO PROBING CANCELLED and CIAO ANNOUNCEMENT CANCELLED, and the wired-up handleCiaoUnhandledRejection returns true to suppress them via registerUnhandledRejectionHandler.

But the registration happens inside createCycle(), which runs after getResponder() and responder.createService(...) — and @homebridge/ciao begins probing as soon as a service is created. If the host network reconfigures during early startup, or the multicast interface flaps inside a container (very common in Docker/k8s with overlay networking), the probe promise rejects asynchronously, but at that instant the handler may not yet be in the handlers set in src/infra/unhandled-rejections.ts. The rejection escapes, the global handler logs Unhandled promise rejection: CIAO PROBING CANCELLED, writes the stability bundle, and the gateway exits.

Fix

Hoist registerUnhandledRejectionHandler(handleCiaoUnhandledRejection) to the top of startGatewayBonjourAdvertiser, before loadCiaoModule() and before any service is created, so any cancelled probe — early-startup or otherwise — is already caught.

Side benefit: the handler now stays installed for the entire lifetime of the advertiser, including across watchdog-driven recreates. Previously each recreate re-registered/unregistered; that's strictly less robust.

Behavior matrix

ScenarioOldNew
Probe cancelled before first cycle finishes registering💥 crashsuppressed, debug log
Probe cancelled mid-lifetimesuppressedsuppressed
Probe cancelled during recreate (between cycles)window where it could escapealways suppressed
Stop ordering: responder.shutdown() then handler cleanuppreservedpreserved
registerUnhandledRejectionHandler calls per advertiser1 per cycle1 total

The existing test in advertiser.test.ts that asserts order = ["shutdown", "cleanup"] and registerUnhandledRejectionHandler was called exactly once still passes by inspection — the early registration replaces the per-cycle one and the cleanup runs after responder.shutdown() in stop().

Risk

Low. No public API change. The only behavioral difference is that benign ciao cancellation rejections during early startup are now correctly classified instead of escaping to the global handler. Non-classified rejections still escape exactly as before.

Tests

The two relevant existing tests (logs ciao handler classifications… and the cleanup-order test) cover the new path:

  • The handler is still registered exactly once per advertiser (now early instead of inside the cycle).
  • cleanup is invoked after responder.shutdown() in stop().
  • Recreates do not re-register the handler.

Closes #71751.

Changed files

  • extensions/bonjour/src/advertiser.ts (modified, +28/-7)

Code Example

ubuntu@oraclevm:~$ sudo cat .openclaw/logs/stability/openclaw-stability-2026-04-25T20-14-47-698Z-7-unhandled_rejection.json
{
  "version": 1,
  "generatedAt": "2026-04-25T20:14:47.698Z",
  "reason": "unhandled_rejection",
  "process": {
    "pid": 7,
    "platform": "linux",
    "arch": "arm64",
    "node": "24.14.0",
    "uptimeMs": 59780
  },
  "host": {
    "hostname": "<redacted-hostname>"
  },
  "snapshot": {
    "generatedAt": "2026-04-25T20:14:47.698Z",
    "capacity": 1000,
    "count": 0,
    "dropped": 0,
    "events": [],
    "summary": {
      "byType": {}
    }
  }
}
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

2026-04-25T20:14:47.695+00:00 [openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED 2026-04-25T20:14:47.700+00:00 [openclaw] wrote stability bundle: /home/node/.openclaw/logs/stability/openclaw-stability-2026-04-25T20-14-47-698Z-7-unhandled_rejection.json

Steps to reproduce

Start openclaw via docker container

Expected behavior

Work as normal

Actual behavior

Crashes

OpenClaw version

2026.4.23

Operating system

Ubuntu 24.04.4

Install method

docker

Model

openai-codex/gpt-5.4

Provider / routing chain

openclaw -> openai

Additional provider/model setup details

No response

Logs, screenshots, and evidence

ubuntu@oraclevm:~$ sudo cat .openclaw/logs/stability/openclaw-stability-2026-04-25T20-14-47-698Z-7-unhandled_rejection.json
{
  "version": 1,
  "generatedAt": "2026-04-25T20:14:47.698Z",
  "reason": "unhandled_rejection",
  "process": {
    "pid": 7,
    "platform": "linux",
    "arch": "arm64",
    "node": "24.14.0",
    "uptimeMs": 59780
  },
  "host": {
    "hostname": "<redacted-hostname>"
  },
  "snapshot": {
    "generatedAt": "2026-04-25T20:14:47.698Z",
    "capacity": 1000,
    "count": 0,
    "dropped": 0,
    "events": [],
    "summary": {
      "byType": {}
    }
  }
}

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

Investigate and handle the unhandled promise rejection in the OpenClaw application to prevent crashes.

Guidance

  • Review the OpenClaw code to identify the source of the unhandled promise rejection, focusing on areas that interact with the openai provider.
  • Check the openclaw-stability-2026-04-25T20-14-47-698Z-7-unhandled_rejection.json log file for more detailed information about the error.
  • Consider adding error handling mechanisms, such as try-catch blocks or promise chaining, to handle potential rejections and prevent application crashes.
  • Verify that the openai-codex/gpt-5.4 model is properly configured and compatible with the OpenClaw version 2026.4.23.

Notes

The provided log file does not contain detailed information about the error, so additional debugging may be required to identify the root cause.

Recommendation

Apply workaround: Implement error handling mechanisms to catch and handle promise rejections, preventing application crashes while investigating the root cause of 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…

FAQ

Expected behavior

Work as normal

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]: Docker container crashes on 4.24 due to [openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED [1 pull requests, 3 comments, 2 participants]