Skip to content

fix: resolve MCP server startup crash on macOS (issue #46)#51

Open
mlab817 wants to merge 1 commit into
ai-dashboad:mainfrom
mlab817:fix/mcp-server-startup-crash
Open

fix: resolve MCP server startup crash on macOS (issue #46)#51
mlab817 wants to merge 1 commit into
ai-dashboad:mainfrom
mlab817:fix/mcp-server-startup-crash

Conversation

@mlab817
Copy link
Copy Markdown

@mlab817 mlab817 commented Jun 5, 2026

Summary

Fixes #46 — MCP server fails to start on macOS v0.9.36.

Two root causes identified and fixed (as described in this comment):

  • spawn ENOEXEC from zero-byte cached binarypackaging/npm/bin/cli.js only checked if the binary file existed, not whether it had content. A failed/interrupted download leaves a 0-byte file that passes the existence check but crashes on execution. Added fs.statSync(localBinaryPath).size > 0 to the guard.
  • Dart fallback import package name mismatchpackaging/npm/dart/bin/server.dart imported package:flutter_skill/... but dart/pubspec.yaml declares the package as flutter_skill_npm. Updated the import to match.

Test plan

  • Delete ~/.flutter-skill to clear any cached binary, restart the MCP server — it should fall back to Dart and start successfully
  • Verify a partial/empty binary at ~/.flutter-skill/bin/ is skipped and re-downloaded rather than executed

🤖 Generated with Claude Code

- Skip 0-byte cached binaries in cli.js by adding fs.statSync size check
  to prevent spawn ENOEXEC when a corrupted/incomplete download is cached
- Fix Dart fallback import in dart/bin/server.dart to use the correct
  local package name flutter_skill_npm (matches dart/pubspec.yaml)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp server doesn't start v0.9.36

1 participant