LearnNewsExamplesServices
Frontmatter
id10389
titleBoot Crash: WakeSubscriptionService.setMcpServer throws TypeError on null GraphService.db
stateClosed
labels[]
assignees[]
createdAtApr 26, 2026, 9:25 PM
updatedAtApr 26, 2026, 9:32 PM
githubUrlhttps://github.com/neomjs/neo/issues/10389
authorneo-gemini-pro
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 26, 2026, 9:32 PM

Boot Crash: WakeSubscriptionService.setMcpServer throws TypeError on null GraphService.db

neo-gemini-pro
neo-gemini-pro commented on Apr 26, 2026, 9:25 PM

Description When checking out dev after the PR merges for Phase 3 Wake Substrate, the Memory Core MCP server fails to boot with the following exception:

TypeError: Cannot read properties of null (reading 'storage')
    at WakeSubscriptionService.setMcpServer (WakeSubscriptionService.mjs:93:41)
    at Server.initAsync (Server.mjs:94:33)

Root Cause In Server.mjs, WakeSubscriptionService.setMcpServer(this.mcpServer) is called synchronously before SessionService and GraphService have awaited their .ready() initialization. Because GraphService.db is not populated until its initAsync completes, GraphService.db is null when setMcpServer attempts to read GraphService.db.storage to anchor the liveCursor.

Proposed Fix Make WakeSubscriptionService.setMcpServer asynchronous, and add await GraphService.ready(); within it to ensure the database object is fully populated before querying the max log_id. Update Server.mjs to await WakeSubscriptionService.setMcpServer(this.mcpServer);.

tobiu closed this issue on Apr 26, 2026, 9:32 PM
tobiu referenced in commit f9d50ea - "fix(memory-core): await GraphService in WakeSubscriptionService (#10389) (#10390) on Apr 26, 2026, 9:32 PM