flutter-skill icon indicating copy to clipboard operation
flutter-skill copied to clipboard

mcp server doesn't start v0.9.36

Open easazade opened this issue 7 months ago • 4 comments

MCP server doesn't start at all. I have installed the latest version.

Image

easazade avatar Apr 19 '26 16:04 easazade

me also the error is

flutter-skill server

Error: spawn Unknown system error -8 at ChildProcess.spawn (node:internal/child_process:420:11) at spawn (node:child_process:753:9) at runNativeBinary (/Users/dda190/.npm-global/lib/node_modules/flutter-skill/bin/cli.js:125:18) at main (/Users/dda190/.npm-global/lib/node_modules/flutter-skill/bin/cli.js:93:5) at Object. (/Users/dda190/.npm-global/lib/node_modules/flutter-skill/bin/cli.js:321:1) at Module._compile (node:internal/modules/cjs/loader:1554:14) at Object..js (node:internal/modules/cjs/loader:1706:10) at Module.load (node:internal/modules/cjs/loader:1289:32) at Function._load (node:internal/modules/cjs/loader:1108:12) at TracingChannel.traceSync (node:diagnostics_channel:322:14) { errno: -8, code: 'Unknown system error -8', syscall: 'spawn' }

wirewalker avatar Apr 29 '26 14:04 wirewalker

Same problem but with no error output whatsoever. Running any commands from flutter-skill does nothing.

grinder15 avatar May 19 '26 06:05 grinder15

same. i am currently using the dart version flutter_skill for now but this is far more convenient to have.

mlab817 avatar May 21 '26 03:05 mlab817

Hi everyone,

I encountered the startup crash on macOS when initializing the flutter-skill MCP server and have pinpointed the two underlying issues along with their resolutions.


Issue 1: spawn ENOEXEC due to zero-byte cached binary

The Problem

If a network request fails, is interrupted, or returns a 404 error during the binary download, it can leave a 0-byte empty file cached at ~/.flutter-skill/bin/flutter-skill-macos-arm64-v0.9.36.

Inside bin/cli.js, the script only checks if the file exists:

if (localBinaryPath && fs.existsSync(localBinaryPath)) {
  runNativeBinary(localBinaryPath);
  return;
}

Because the empty 0-byte file exists, it tries to execute it, resulting in the immediate crash: Error: spawn ENOEXEC at ChildProcess.spawn

Proposed Fix

Add a file size check using fs.statSync to verify the binary is not empty before attempting to execute it:

-  if (localBinaryPath && fs.existsSync(localBinaryPath)) {
+  if (localBinaryPath && fs.existsSync(localBinaryPath) && fs.statSync(localBinaryPath).size > 0) {
     try { fs.chmodSync(localBinaryPath, 0o755); } catch (_) {}
     runNativeBinary(localBinaryPath);
     return;
   }

Temporary Workaround for Users: Delete the corrupted cache directory to force the fallback to the Dart runtime:

rm -rf ~/.flutter-skill

Issue 2: Dart Fallback Compilation Failure (bin/server.dart)

The Problem

After clearing the empty binary cache, the CLI correctly falls back to the Dart VM runtime but fails with the following package resolution error:

Error: Couldn't resolve the package 'flutter_skill' in 'package:flutter_skill/src/cli/server.dart'.
bin/server.dart:1:8: Error: Not found: 'package:flutter_skill/src/cli/server.dart'
import 'package:flutter_skill/src/cli/server.dart';

This happens because the nested Dart package's name in dart/pubspec.yaml is declared as flutter_skill_npm:

name: flutter_skill_npm

However, dart/bin/server.dart attempts to import the server using the pub.dev name flutter_skill:

import 'package:flutter_skill/src/cli/server.dart';

Proposed Fix

Update the import inside dart/bin/server.dart to match the package name declared in the local pubspec.yaml:

-import 'package:flutter_skill/src/cli/server.dart';
+import 'package:flutter_skill_npm/src/cli/server.dart';
 
 void main(List<String> args) => runServer(args);

Applying these two simple fixes completely resolves the startup failures and allows the server to run stably using the Dart fallback. Hope this helps!

junaidalibacha avatar May 22 '26 12:05 junaidalibacha