{"record":{"id":"17d7ab31a993972b","repo":"wavetermdev/waveterm","slug":"build-output-not-found-w","errorCode":null,"errorMessage":"build output not found: %w","messagePattern":"build output not found: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/buildercontroller/buildercontroller.go","lineNumber":255,"sourceCode":"\t\tSdkVersion:     sdkVersion,\n\t\tNodePath:       nodePath,\n\t\tGoPath:         goPath,\n\t\tOutputCapture:  outputCapture,\n\t\tMoveFileBack:   true,\n\t})\n\n\tfor _, line := range outputCapture.GetLines() {\n\t\tbc.outputBuffer.AddLine(line)\n\t}\n\n\tif err != nil {\n\t\tbc.handleBuildError(fmt.Errorf(\"build failed: %w\", err), resultCh)\n\t\treturn\n\t}\n\n\tinfo, err := os.Stat(cachePath)\n\tif err != nil {\n\t\tbc.handleBuildError(fmt.Errorf(\"build output not found: %w\", err), resultCh)\n\t\treturn\n\t}\n\n\tif runtime.GOOS != \"windows\" && info.Mode()&0111 == 0 {\n\t\tbc.handleBuildError(fmt.Errorf(\"build output is not executable\"), resultCh)\n\t\treturn\n\t}\n\n\tprocess, err := bc.runBuilderApp(ctx, appId, cachePath, builderEnv)\n\tif err != nil {\n\t\tbc.handleBuildError(fmt.Errorf(\"failed to run app: %w\", err), resultCh)\n\t\treturn\n\t}\n\n\tbc.lock.Lock()\n\tbc.process = process\n\tbc.setStatus_nolock(BuilderStatus_Running, process.Port, 0, \"\")\n\tbc.lock.Unlock()","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/buildercontroller/buildercontroller.go#L237-L273","documentation":"After a successful TsunamiBuildInternal call, the controller stats the expected output binary at cachePath. This wrapped error means the build reported success but the expected executable file does not exist at the output path (os.Stat failed), usually a build pipeline issue (MoveFileBack failed, wrong OutputFile location).","triggerScenarios":"TsunamiBuildInternal returns nil but the built binary is not present at cachePath — output file moved/renamed elsewhere, build silently skipped, or cachePath removed between build and stat.","commonSituations":"SDK/build pipeline version mismatch producing output at a different name/location; antivirus or cleanup process deleting the fresh binary; race with a concurrent build on the same appId.","solutions":["Re-run the build with KeepTemp=true to inspect intermediate outputs","Confirm OutputFile/cachePath matches where TsunamiBuildInternal actually writes","Check for concurrent builds of the same app and serialize them","Inspect disk space/permissions on the app cache directory"],"exampleFix":"// before\ninfo, err := os.Stat(cachePath) // ENOENT after build\n// after\nif _, err := os.Stat(cachePath); os.IsNotExist(err) {\n    // re-run TsunamiBuildInternal with KeepTemp=true to diagnose where output landed\n}","handlingStrategy":"validation","validationCode":"if _, err := os.Stat(cachePath); os.IsNotExist(err) {\n    return fmt.Errorf(\"expected build output missing at %s\", cachePath)\n}","typeGuard":null,"tryCatchPattern":"if err := runBuild(appId); err != nil {\n    if strings.Contains(err.Error(), \"build output not found\") { /* rebuild with KeepTemp */ }\n}","preventionTips":["Avoid concurrent builds of the same app","Confirm OutputFile path matches build config","Exclude the cache dir from antivirus/cleanup jobs","Re-run with KeepTemp=true when diagnosing"],"tags":["go","filesystem","build"],"backgroundTag":"missing-build-output","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}