Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Persistent JSON SyntaxError in heartbeat endpoint despite active session (Expected double-quoted property name at position 91) #1

Open

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 status still 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /