Skip to content

Commit 3e5e087

Browse files
author
techartdev
committed
Bump OpenClaw to version 0.5.72 and add repair for known invalid config settings
1 parent c769cb8 commit 3e5e087

5 files changed

Lines changed: 74 additions & 2 deletions

File tree

DOCS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,18 @@ Go to **Settings → Add-ons → OpenClaw Assistant → Log** tab. Logs show sta
811811
3. Is the port correct? `openclaw config get gateway.port`
812812
4. Is the firewall blocking the port? Check your HA host firewall rules
813813

814+
### Gateway restart loop: `web_search provider is not available: brave`
815+
816+
**Symptom**: Logs repeat `Invalid config at /config/.openclaw/openclaw.json` and `tools.web.search.provider: web_search provider is not available: brave`.
817+
818+
**Cause**: The persisted OpenClaw config selects the Brave web search provider, but that provider plugin is not currently installed or enabled in the add-on runtime.
819+
820+
**Fix**: In v0.5.72+ the add-on clears that unavailable provider automatically during startup. On older versions, run this in the add-on terminal, then restart:
821+
822+
```sh
823+
jq 'del(.tools.web.search.provider)' /config/.openclaw/openclaw.json > /tmp/openclaw.json && mv /tmp/openclaw.json /config/.openclaw/openclaw.json
824+
```
825+
814826
### "disconnected (1008): control ui requires device identity" / "requires HTTPS or localhost"
815827

816828
**Symptom**: Gateway UI shows error 1008 or "requires secure context / device identity".

openclaw_assistant/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to the OpenClaw Assistant Home Assistant Add-on will be documented in this file.
44

5+
## [0.5.72] - 2026-05-04
6+
7+
### Fixed
8+
- Repair startup when a persisted OpenClaw config still selects the unavailable `tools.web.search.provider=brave` provider. The add-on now clears that provider before launching the gateway so OpenClaw can start; users can reinstall/enable the Brave provider later if they want web search through Brave.
9+
510
## [0.5.70] - 2026-04-30
611

712
- Bump OpenClaw to 2026.4.27.

openclaw_assistant/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: OpenClaw Assistant
2-
version: "0.5.71"
2+
version: "0.5.72"
33
slug: openclaw_assistant
44
description: Run OpenClaw Assistant (OpenClaw-compatible) as a Home Assistant add-on.
55
url: https://github.com/techartdev/OpenClawHomeAssistant

openclaw_assistant/oc_config_helper.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,43 @@ def set_control_ui_origins(origins_csv: str, additional_origins_csv: str = "", d
256256
return False
257257

258258

259+
def repair_known_invalid_settings():
260+
"""Repair known config values that prevent OpenClaw from starting."""
261+
cfg = read_config()
262+
if cfg is None:
263+
return True
264+
265+
tools = cfg.get("tools")
266+
if not isinstance(tools, dict):
267+
return True
268+
269+
web = tools.get("web")
270+
if not isinstance(web, dict):
271+
return True
272+
273+
search = web.get("search")
274+
if not isinstance(search, dict):
275+
return True
276+
277+
provider = search.get("provider")
278+
changes = []
279+
280+
if provider == "brave":
281+
del search["provider"]
282+
changes.append("removed unavailable tools.web.search.provider=brave")
283+
284+
if not changes:
285+
print("INFO: No known invalid OpenClaw config settings found")
286+
return True
287+
288+
if write_config(cfg):
289+
print(f"INFO: Repaired OpenClaw config: {', '.join(changes)}")
290+
return True
291+
292+
print("ERROR: Failed to write config")
293+
return False
294+
295+
259296
def main():
260297
"""CLI entry point for use by run.sh"""
261298
if len(sys.argv) < 2:
@@ -300,6 +337,13 @@ def main():
300337
success = set_control_ui_origins(origins_csv, additional_origins_csv, disable_device_auth)
301338
sys.exit(0 if success else 1)
302339

340+
elif cmd == "repair-known-invalid-settings":
341+
if len(sys.argv) != 2:
342+
print("Usage: oc_config_helper.py repair-known-invalid-settings")
343+
sys.exit(1)
344+
success = repair_known_invalid_settings()
345+
sys.exit(0 if success else 1)
346+
303347
elif cmd == "set":
304348
if len(sys.argv) != 4:
305349
print("Usage: oc_config_helper.py set <key> <value>")

openclaw_assistant/run.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,20 @@ fi
562562

563563
if [ -f "$OPENCLAW_CONFIG_PATH" ]; then
564564
if [ -f "$HELPER_PATH" ]; then
565+
if python3 "$HELPER_PATH" repair-known-invalid-settings; then
566+
:
567+
else
568+
rc=$?
569+
echo "ERROR: Failed to repair known invalid OpenClaw config settings via oc_config_helper.py (exit code ${rc})."
570+
echo "ERROR: Gateway configuration may be invalid; aborting startup."
571+
exit "${rc}"
572+
fi
573+
565574
# In lan_https mode the gateway uses an internal port; nginx owns the external one.
566575
EFFECTIVE_GW_PORT="$GATEWAY_INTERNAL_PORT"
567-
if ! python3 "$HELPER_PATH" apply-gateway-settings "$GATEWAY_MODE" "$GATEWAY_REMOTE_URL" "$GATEWAY_BIND_MODE" "$EFFECTIVE_GW_PORT" "$ENABLE_OPENAI_API" "$GATEWAY_AUTH_MODE" "$GATEWAY_TRUSTED_PROXIES"; then
576+
if python3 "$HELPER_PATH" apply-gateway-settings "$GATEWAY_MODE" "$GATEWAY_REMOTE_URL" "$GATEWAY_BIND_MODE" "$EFFECTIVE_GW_PORT" "$ENABLE_OPENAI_API" "$GATEWAY_AUTH_MODE" "$GATEWAY_TRUSTED_PROXIES"; then
577+
:
578+
else
568579
rc=$?
569580
echo "ERROR: Failed to apply gateway settings via oc_config_helper.py (exit code ${rc})."
570581
echo "ERROR: Gateway configuration may be incorrect; aborting startup."

0 commit comments

Comments
 (0)