openclaw - 💡(How to fix) Fix [Bug]: Beta blocker: bonjour/ciao - Gateway crashes every ~30s on WSL2 due to CIAO PROBING CANCELLED unhandled promise rejection [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#71846Fetched 2026-04-26 05:07:36
View on GitHub
Comments
3
Participants
2
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
commented ×3closed ×1labeled ×1mentioned ×1

The OpenClaw gateway crashes every ~30 seconds on WSL2 due to an unhandled promise rejection (CIAO PROBING CANCELLED) thrown by the bonjour/ciao mDNS plugin during network probing, which OpenClaw catches internally and uses to call process.exit(), making the gateway unusable on WSL2.

Error Message

  1. The bonjour/mDNS plugin should handle the CIAO PROBING CANCELLED rejection gracefully on WSL2 — either by catching the error and continuing without mDNS discovery, or by providing a supported config option (gateway.bonjour.enabled: false) to disable the plugin entirely on environments where mDNS probing is not supported. The gateway should remain running and stable regardless of whether mDNS is available on the host network.
  2. The setup wizard completes without error but does not save the API key to openclaw.json. The auth.profiles.openai:default entry is created with provider and mode fields only — the key field is absent. The key is eventually stored in ~/.openclaw/agents/main/agent/auth-profiles.json but the gateway fails to read it, returning HTTP 401: Incorrect API key provided on every TUI connection attempt. All attempts to manually set the key via openclaw config, openclaw configure wizard, OPENAI_API_KEY environment variable, systemd service override, and direct JSON editing either fail config validation, get clobbered by OpenClaw's own config validator, or are ignored by the gateway process.
  3. TUI auth error (every session): Bonjour crash occurs on every gateway start without exception, every ~30 seconds 401 auth error occurs on every TUI session without exception

Root Cause

The OpenClaw gateway crashes every ~30 seconds on WSL2 due to an unhandled promise rejection (CIAO PROBING CANCELLED) thrown by the bonjour/ciao mDNS plugin during network probing, which OpenClaw catches internally and uses to call process.exit(), making the gateway unusable on WSL2.

Fix Action

Fix / Workaround

  1. The OpenClaw setup wizard should save the API key to the correct location in openclaw.json or auth-profiles.json during onboarding, and the gateway should be able to read and use it without requiring manual intervention.
  2. The bonjour/mDNS plugin should handle the CIAO PROBING CANCELLED rejection gracefully on WSL2 — either by catching the error and continuing without mDNS discovery, or by providing a supported config option (gateway.bonjour.enabled: false) to disable the plugin entirely on environments where mDNS probing is not supported. The gateway should remain running and stable regardless of whether mDNS is available on the host network. Reference: The OpenClaw docs recommend WSL2 as the preferred Windows setup, implying the gateway should run stably in this environment. The gateway.bonjour.enabled key was attempted but rejected by config validation as an unrecognised key, confirming no supported workaround currently exists.

Regression status: Cannot confirm as regression — this is a fresh WSL2 install with no prior known-good version on this system. First observed on 2026.4.22, persists on 2026.4.24. Workarounds attempted and failed:

WSL2 eth0 interface has MULTICAST enabled, ruling out multicast being disabled as the cause of the bonjour failure The ciao mDNS library appears unable to complete probing on WSL2's Hyper-V virtual network regardless of interface configuration OpenClaw's internal stability bundle handler appears to be calling process.exit() on unhandled rejections, making Node-level suppression impossible without patching the source The config clobbering mechanism actively reverts manual JSON edits, making any workaround that involves direct file editing unreliable The wizard defaulted to openai/gpt-5.4 despite gpt-4.1 being selected during setup No successful inference requests were completed due to the 401 auth bug, so the routing chain is based on configured setup rather than observed traffic

Code Example

1. Gateway crash loop (journalctl):
[gateway] loading configuration…
[gateway] resolving authentication…
[gateway] starting...
[gateway] starting HTTP server...
[health-monitor] started (interval: 300s, startup-grace: 60s)
[gateway] agent model: openai/gpt-5.4
[gateway] ready (7 plugins: acpx, bonjour, browser, device-pair, phone-control, talk-voice, telegram)
[gateway] starting channels and sidecars...
[hooks] loaded 4 internal hook handlers
[plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (state=probing)
[plugins] bonjour: restarting advertiser (service stuck in probing for ~10000ms)
[plugins] bonjour: advertised gateway state=unannounced
[openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED
[openclaw] wrote stability bundle: openclaw-stability-*.json
systemd: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
systemd: openclaw-gateway.service: Failed with result 'exit-code'.
systemd: openclaw-gateway.service: Scheduled restart job, restart counter is at N.

2. TUI auth error (every session):
HTTP 401: Incorrect API key provided: OpenAI a******thod.
gateway connected | idle
agent main | session main | openai/gpt-4.1 | tokens ?/1.0m

3. auth-profiles.json structure (redacted):
{
  "version": 1,
  "profiles": {
    "openai:default": {
      "type": "api_key",
      "provider": "openai",
      "key": "[REDACTED]"
    }
  }
}

4. openclaw.json auth section (key absent — bug evidence):
"auth": {
  "profiles": {
    "openai:default": {
      "provider": "openai",
      "mode": "api_key"
    }
  }
}

5. Direct API key verification (curl — key works):
curl https://api.openai.com/v1/models -H "Authorization: Bearer [REDACTED]"
Returns full model list successfully

6. Network interface (WSL2):
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500

OpenClaw version: 2026.4.24 (cbcfdf6)
Node.js version: v22.22.2
WSL2 distro: Ubuntu 24
RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Beta release blocker

Yes

Summary

The OpenClaw gateway crashes every ~30 seconds on WSL2 due to an unhandled promise rejection (CIAO PROBING CANCELLED) thrown by the bonjour/ciao mDNS plugin during network probing, which OpenClaw catches internally and uses to call process.exit(), making the gateway unusable on WSL2.

Steps to reproduce

  1. Install OpenClaw on WSL2 (Ubuntu 24) on Windows using npm global install.
  2. Run openclaw onboard --install-daemon to set up the systemd gateway service
  3. Complete quickstart setup wizard with OpenAI API key
  4. Observe that the API key is not saved to openclaw.json by the wizard — the auth.profiles.openai:default entry is created but the key field is missing
  5. The correct key location is in ~/.openclaw/agents/main/agent/auth-profiles.json under profiles.openai:default.key — however attempts to set the key via openclaw config, openclaw configure, environment variables (OPENAI_API_KEY), and direct JSON editing all either fail validation or get clobbered/ignored
  6. Start the gateway with openclaw gateway start
  7. Wait approximately 30/60 seconds
  8. Observe gateway crashes with CIAO PROBING CANCELLED unhandled promise rejection and systemd reports status=1/FAILURE
  9. Gateway auto-restarts via systemd and repeats the crash loop indefinitely

Expected behavior

  1. The OpenClaw setup wizard should save the API key to the correct location in openclaw.json or auth-profiles.json during onboarding, and the gateway should be able to read and use it without requiring manual intervention.
  2. The bonjour/mDNS plugin should handle the CIAO PROBING CANCELLED rejection gracefully on WSL2 — either by catching the error and continuing without mDNS discovery, or by providing a supported config option (gateway.bonjour.enabled: false) to disable the plugin entirely on environments where mDNS probing is not supported. The gateway should remain running and stable regardless of whether mDNS is available on the host network. Reference: The OpenClaw docs recommend WSL2 as the preferred Windows setup, implying the gateway should run stably in this environment. The gateway.bonjour.enabled key was attempted but rejected by config validation as an unrecognised key, confirming no supported workaround currently exists.

Actual behavior

  1. The setup wizard completes without error but does not save the API key to openclaw.json. The auth.profiles.openai:default entry is created with provider and mode fields only — the key field is absent. The key is eventually stored in ~/.openclaw/agents/main/agent/auth-profiles.json but the gateway fails to read it, returning HTTP 401: Incorrect API key provided on every TUI connection attempt. All attempts to manually set the key via openclaw config, openclaw configure wizard, OPENAI_API_KEY environment variable, systemd service override, and direct JSON editing either fail config validation, get clobbered by OpenClaw's own config validator, or are ignored by the gateway process.
  2. The gateway starts successfully and loads all 7 plugins including bonjour, but after ~30 seconds the following is observed in the systemd journal: [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise [plugins] bonjour: restarting advertiser (service stuck in probing ~10000ms) [openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED [openclaw] wrote stability bundle: openclaw-stability-*.json systemd: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE The gateway then enters an infinite crash/restart loop via systemd, making it completely unusable on WSL2.

OpenClaw version

2026.4.24 (cbcfdf6)

Operating system

Windows 11 with WSL2 (Ubuntu 24)

Install method

npm global install

Model

openai/gpt-4.1

Provider / routing chain

OpenAI API (direct) → api.openai.com → gpt-4.1 Route: OpenClaw TUI → local WebSocket (ws://127.0.0.1:18789) → OpenClaw Gateway (systemd user service) → OpenAI REST API (api_key auth mode)

Additional provider/model setup details

Auth profile: openai:default — mode: api_key, provider: openai Config locations involved:

~/.openclaw/openclaw.json — auth profile entry created by wizard but key field not saved ~/.openclaw/agents/main/agent/auth-profiles.json — correct key location, populated via openclaw configure wizard, structure: profiles.openai:default.key ~/.openclaw/agents/main/agent/auth-state.json — shows errorCount: 0 but lastFailureAt populated, suggesting auth resolution is failing silently

Model config:

Wizard defaulted to openai/gpt-5.4 as primary despite gpt-4.1 being selected during onboarding openclaw.json shows model.primary: openai/gpt-5.4 with model.fallbacks: [openai/gpt-4.1] Gateway logs confirm agent model: openai/gpt-5.4 on startup

Environment:

OPENAI_API_KEY set in ~/.bashrc and tested via systemd service override — neither was picked up by the gateway API key verified working via direct curl to api.openai.com/v1/models — returned full model list successfully No proxy or custom routing in use — direct API connection only

Logs, screenshots, and evidence

1. Gateway crash loop (journalctl):
[gateway] loading configuration…
[gateway] resolving authentication…
[gateway] starting...
[gateway] starting HTTP server...
[health-monitor] started (interval: 300s, startup-grace: 60s)
[gateway] agent model: openai/gpt-5.4
[gateway] ready (7 plugins: acpx, bonjour, browser, device-pair, phone-control, talk-voice, telegram)
[gateway] starting channels and sidecars...
[hooks] loaded 4 internal hook handlers
[plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (state=probing)
[plugins] bonjour: restarting advertiser (service stuck in probing for ~10000ms)
[plugins] bonjour: advertised gateway state=unannounced
[openclaw] Unhandled promise rejection: CIAO PROBING CANCELLED
[openclaw] wrote stability bundle: openclaw-stability-*.json
systemd: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
systemd: openclaw-gateway.service: Failed with result 'exit-code'.
systemd: openclaw-gateway.service: Scheduled restart job, restart counter is at N.

2. TUI auth error (every session):
HTTP 401: Incorrect API key provided: OpenAI a******thod.
gateway connected | idle
agent main | session main | openai/gpt-4.1 | tokens ?/1.0m

3. auth-profiles.json structure (redacted):
{
  "version": 1,
  "profiles": {
    "openai:default": {
      "type": "api_key",
      "provider": "openai",
      "key": "[REDACTED]"
    }
  }
}

4. openclaw.json auth section (key absent — bug evidence):
"auth": {
  "profiles": {
    "openai:default": {
      "provider": "openai",
      "mode": "api_key"
    }
  }
}

5. Direct API key verification (curl — key works):
curl https://api.openai.com/v1/models -H "Authorization: Bearer [REDACTED]"
→ Returns full model list successfully

6. Network interface (WSL2):
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500

OpenClaw version: 2026.4.24 (cbcfdf6)
Node.js version: v22.22.2
WSL2 distro: Ubuntu 24

Impact and severity

Affected users/systems/channels:

All Windows users following the recommended WSL2 installation path Telegram channel integration (confirmed configured and affected) Any channel dependent on a stable gateway connection New users attempting first-time onboarding on WSL2

Severity: Blocks workflow completely

The 401 auth bug prevents the agent from responding to any message on any channel The bonjour crash loop means the gateway never stays running long enough to process a request even if auth were resolved Together these two bugs make OpenClaw entirely non-functional on WSL2 from a fresh install

Frequency: Always — 100% reproducible

Bonjour crash occurs on every gateway start without exception, every ~30 seconds 401 auth error occurs on every TUI session without exception Reproduced across OpenClaw versions 2026.4.22 and 2026.4.24 Reproduced across multiple gateway restarts, WSL2 shutdowns, and fresh terminal sessions

Consequence:

Complete onboarding failure for Windows/WSL2 users — the recommended setup path is non-functional No messages processed via Telegram or any other channel Time and API credits lost during repeated failed setup attempts Users likely to abandon the tool or incorrectly conclude the issue is with their API key or configuration

Additional information

Regression status: Cannot confirm as regression — this is a fresh WSL2 install with no prior known-good version on this system. First observed on 2026.4.22, persists on 2026.4.24. Workarounds attempted and failed:

--unhandled-rejections=none Node flag — ineffective, OpenClaw catches the rejection internally via its own stability bundle handler and calls process.exit() before Node can suppress it gateway.bonjour.enabled: false in openclaw.json — rejected by config validator as unrecognised key OPENAI_API_KEY environment variable in ~/.bashrc — not picked up by systemd service systemd service override with Environment="OPENAI_API_KEY=..." — not picked up by gateway Direct JSON editing of openclaw.json — changes either fail validation or are clobbered by OpenClaw's own config backup/restore mechanism WSL2 full shutdown via wsl --shutdown and restart — no effect on either bug

Supplementary observations:

WSL2 eth0 interface has MULTICAST enabled, ruling out multicast being disabled as the cause of the bonjour failure The ciao mDNS library appears unable to complete probing on WSL2's Hyper-V virtual network regardless of interface configuration OpenClaw's internal stability bundle handler appears to be calling process.exit() on unhandled rejections, making Node-level suppression impossible without patching the source The config clobbering mechanism actively reverts manual JSON edits, making any workaround that involves direct file editing unreliable The wizard defaulted to openai/gpt-5.4 despite gpt-4.1 being selected during setup No successful inference requests were completed due to the 401 auth bug, so the routing chain is based on configured setup rather than observed traffic

extent analysis

TL;DR

The OpenClaw gateway crashes every 30 seconds on WSL2 due to an unhandled promise rejection from the bonjour/mDNS plugin, and the setup wizard fails to save the API key, making the gateway unusable.

Guidance

  • The bonjour/mDNS plugin issue is likely caused by the ciao library's inability to complete probing on WSL2's Hyper-V virtual network.
  • To mitigate the crash, try setting the gateway.bonjour.enabled key to false in openclaw.json, although this is currently rejected by the config validator.
  • The API key issue may be related to the config clobbering mechanism, which reverts manual JSON edits; try setting the OPENAI_API_KEY environment variable in the systemd service override.
  • Verify that the API key is correctly set by checking the auth-profiles.json file and the openclaw.json file.

Example

No code snippet is provided as the issue is related to configuration and plugin issues.

Notes

The provided information suggests that the issues are specific to the WSL2 environment and the ciao library. Further investigation is needed to determine the root cause and a permanent fix.

Recommendation

Apply a workaround by attempting to disable the bonjour plugin or setting the OPENAI_API_KEY environment variable, as the current version of OpenClaw does not provide a supported config option to disable the plugin.

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

  1. The OpenClaw setup wizard should save the API key to the correct location in openclaw.json or auth-profiles.json during onboarding, and the gateway should be able to read and use it without requiring manual intervention.
  2. The bonjour/mDNS plugin should handle the CIAO PROBING CANCELLED rejection gracefully on WSL2 — either by catching the error and continuing without mDNS discovery, or by providing a supported config option (gateway.bonjour.enabled: false) to disable the plugin entirely on environments where mDNS probing is not supported. The gateway should remain running and stable regardless of whether mDNS is available on the host network. Reference: The OpenClaw docs recommend WSL2 as the preferred Windows setup, implying the gateway should run stably in this environment. The gateway.bonjour.enabled key was attempted but rejected by config validation as an unrecognised key, confirming no supported workaround currently exists.

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]: Beta blocker: bonjour/ciao - Gateway crashes every ~30s on WSL2 due to CIAO PROBING CANCELLED unhandled promise rejection [3 comments, 2 participants]