Skip to content

Lens: /api/layout intermittently returns HTTP 500 {"error":"JSON parse failed"} (Linux/WSL2) #2907

Closed

Description

@jflorianar

Version

codebase-memory-mcp 0.12.1

Platform

Linux (x64)

Install channel

GitHub release archive / install.sh / install.ps1

Binary variant

standard

What happened, and what did you expect?

Galaxy/Architecture show "layout unavailable: /api/layout answered with HTTP 500: {"error":"JSON parse failed"}".
Expected: the graph is drawn.
The failure is intermittent: cbm-daemon.log has 102 lines of GET /api/layout status=500 response_bytes=29, interleaved with 200 responses (~266 KB). In the log, the oldest 500s appear before the first start of 0.12.1, so they seem to also happen with 0.11.0 (the log has no timestamps, so I can't confirm it).
Two older indexes of other projects open fine in the same browser. The UI log also repeats "THREE.WebGLRenderer: Context Lost".

Reproduction

I could NOT reproduce it on public code yet. It happens on a private Python project (cannot be shared): mode full, 1644 nodes, 4497 edges, 658 Section nodes from 71 .md files, MENTIONS and REFERENCES_FILE edges.

  1. codebase-memory-mcp daemon start --port=9749
  2. Open http://127.0.0.1:9749 in Chrome (Windows host, daemon in WSL2) and open the project in Galaxy or Architecture.
  3. Actual: "layout unavailable" (HTTP 500 JSON parse failed). Expected: the graph is drawn.
    I can try to reproduce with a public repository with many .md files if that helps.

Logs


Diagnostics trajectory (memory / performance / leak issues)


Project scale (if relevant)

No response

Confirmations

  • I searched existing issues and this is not a duplicate.
  • My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.

Activity

  1. mvanhorn commented on Nov 4, 2026

    @mvanhorn
    Contributor

    Implemented in #2913.

  2. DeusData commented on Nov 9, 2026

    @DeusData
    Owner

    Fixed by #2913, merged in 822e7fc. Layout text that is not valid UTF-8 (for example a heading saved in a non-UTF-8 encoding) made /api/layout fail its own JSON re-read. Invalid bytes are now replaced with U+FFFD, so Galaxy and Architecture draw the graph and show the replacement character where the source had broken bytes. Thank you, @jflorianar, for the detailed report - the daemon log counts and the note about the Section nodes from your Markdown files pointed straight at the cause. It will be part of the next release; if you still see "layout unavailable" after updating, please reopen with the new daemon log lines.

  3. added a commit that references this issue on Nov 9, 2026
    ba22c96
  4. added a commit that references this issue on Nov 10, 2026
    d650fb5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingux/behaviorDisplay bugs, docs, adoption UXwindowsWindows-specific issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions