{"record":{"id":"e27febd032351787","repo":"ipfs/kubo","slug":"failed-to-start-subcommand-s","errorCode":null,"errorMessage":"failed to start subcommand: %s","messagePattern":"failed to start subcommand: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/external.go","lineNumber":56,"sourceCode":"\n\t\t\tr, w := io.Pipe()\n\n\t\t\tcmd := exec.Command(binname, req.Arguments...)\n\n\t\t\t// TODO: make commands lib be able to pass stdin through daemon\n\t\t\t// cmd.Stdin = req.Stdin()\n\t\t\tcmd.Stdin = io.LimitReader(nil, 0)\n\t\t\tcmd.Stdout = w\n\t\t\tcmd.Stderr = w\n\n\t\t\t// setup env of child program\n\t\t\tosenv := os.Environ()\n\n\t\t\tcmd.Env = osenv\n\n\t\t\terr = cmd.Start()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to start subcommand: %s\", err)\n\t\t\t}\n\n\t\t\terrC := make(chan error)\n\n\t\t\tgo func() {\n\t\t\t\tvar err error\n\t\t\t\tdefer func() { errC <- err }()\n\t\t\t\terr = cmd.Wait()\n\t\t\t\tw.Close()\n\t\t\t}()\n\n\t\t\terr = res.Emit(r)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\treturn <-errC\n\t\t},","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/external.go#L38-L74","documentation":"The external subcommand binary was found, but exec.Cmd.Start failed before it could run (fork/exec error). %s is the underlying error, typically a missing interpreter, an execute-permission problem, or a binary format mismatch — not a command-not-found case.","triggerScenarios":"Thrown at core/commands/external.go:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the binary is executable (chmod +x) and matches the host architecture","If it is a script, check its shebang interpreter exists","Reinstall the external tool"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}