-
-
Notifications
You must be signed in to change notification settings - Fork 0
Persistent JSON SyntaxError in heartbeat endpoint despite active session (Expected double-quoted property name at position 91) #1
Description
Hi @TomLeeLive
I'm having a persistent issue with the Unity plugin/extension in OpenClaw 2026年2月22日-2.
What works / what I have done so far:
- OpenClaw sees the Unity extension and loads it correctly:
[plugins] [Unity] Plugin loaded - HTTP endpoints at /unity/*
text- Unity Editor (6000年3月9日f1) connects successfully: - Gateway URL: http://localhost:18789
- Status in Unity plugin window: green "Connected"
- Endpoint returns active session:
curl http://localhost:18789/unity/status
→ {"enabled":true,"sessions":[{"sessionId":"unity_1771911444928_8fy7hfi","project":"Chronicles","version":"6000.3.9f1","platform":"Editor","connectedAt":"2026-02-24T05:37:24.928Z","lastSeen":"2026-02-24T05:42:37.707Z","pendingCommands":0}],"sessionCount":1}
text- The skill is installed in~/.openclaw/workspace/skills/unity-plugin/(SKILL.md exists) - AI in OpenClaw chat recognizes @unity commands and responds with session info
What does NOT work / repeating error:
Every ~30 seconds (heartbeat interval) I get this exact error in the gateway logs:
[Unity] HTTP error: SyntaxError: Expected double-quoted property name in JSON at position 91 (line 1 column 92)
at JSON.parse ()
at IncomingMessage. (/home/piotr/.openclaw/extensions/unity/index.ts:69:22)
...
textIt happens consistently on the heartbeat endpoint (most likely POST /unity/heartbeat).
Additional observations:
- The error position is always ~91 chars into the body → very likely the same malformed JSON every time
openclaw unity statusstill shows "No Unity sessions connected" (even though /unity/status endpoint shows active session) → probably a separate CLI bug- I already tried:
- disabling "Capture Console Logs" in Unity plugin window
- restarting gateway multiple times
- reinstalling extension via
./scripts/install-extension.sh - setting
plugins.allow: ["unity"]in config
- The session registers fine (
[Unity] Registered: Chronicles ...), but heartbeat parsing fails every time
Question / next step:
Is it possible that Unity is sending JSON without double quotes around property names?
(e.g. {sessionId: "xxx", project: "Chronicles", ...} instead of {"sessionId": "xxx", ...})
Would it be possible to add debug logging of the raw request body right before JSON.parse in index.ts:69?
Something like:
ts
console.log("[Unity DEBUG] Raw heartbeat body:", body);
so we can see exactly what Unity is sending?
Happy to test any patch or provide more logs / raw body if you add the debug line.
Thanks in advance!
Environment:
OpenClaw: 2026年2月22日-2 (45febec)
Unity: 6000年3月9日f1 (Editor)
OS: Ubuntu in WSL
Plugin installed manually via copy / install-extension.sh