{"record":{"id":"0fedf914e1417a20","repo":"wavetermdev/waveterm","slug":"failed-to-get-builder-executable-path-w","errorCode":null,"errorMessage":"failed to get builder executable path: %w","messagePattern":"failed to get builder executable path: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/buildercontroller/buildercontroller.go","lineNumber":208,"sourceCode":"\treturn nil\n}\n\nfunc (bc *BuilderController) buildAndRun(ctx context.Context, appId string, builderEnv map[string]string, resultCh chan<- *BuildResult) {\n\tappNS, _, err := waveappstore.ParseAppId(appId)\n\tif err != nil {\n\t\tbc.handleBuildError(fmt.Errorf(\"failed to parse app id: %w\", err), resultCh)\n\t\treturn\n\t}\n\n\tappPath, err := waveappstore.GetAppDir(appId)\n\tif err != nil {\n\t\tbc.handleBuildError(fmt.Errorf(\"failed to get app directory: %w\", err), resultCh)\n\t\treturn\n\t}\n\n\tcachePath, err := GetBuilderAppExecutablePath(appPath)\n\tif err != nil {\n\t\tbc.handleBuildError(fmt.Errorf(\"failed to get builder executable path: %w\", err), resultCh)\n\t\treturn\n\t}\n\n\tnodePath := wavebase.GetWaveAppElectronExecPath()\n\tif nodePath == \"\" {\n\t\tbc.handleBuildError(fmt.Errorf(\"electron executable path not set\"), resultCh)\n\t\treturn\n\t}\n\n\tscaffoldPath := waveapputil.GetTsunamiScaffoldPath()\n\tsettings := wconfig.GetWatcher().GetFullConfig().Settings\n\tsdkReplacePath := settings.TsunamiSdkReplacePath\n\tsdkVersion := settings.TsunamiSdkVersion\n\tif sdkVersion == \"\" {\n\t\tsdkVersion = waveapputil.DefaultTsunamiSdkVersion\n\t}\n\tgoPath := settings.TsunamiGoPath\n","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/buildercontroller/buildercontroller.go#L190-L226","documentation":"buildAndRun wraps the error from GetBuilderAppExecutablePath(appPath), which computes the cache path of the built executable inside the app directory. The controller throws this when that path cannot be derived, typically because appPath is not an absolute path as required.","triggerScenarios":"GetBuilderAppExecutablePath receives a relative or empty appPath and refuses to construct the executable cache path; upstream GetAppDir returned a non-absolute path.","commonSituations":"Wave home directory misconfiguration causing relative app paths; custom WAVE_HOME with unusual setup; storage layer returning degraded paths.","solutions":["Ensure the wave home/app storage resolves to absolute paths","Log appPath and confirm it is absolute before calling GetBuilderAppExecutablePath","Fix environment (WAVE_HOME) so GetAppDir returns a proper absolute directory","Verify GetBuilderAppExecutablePath inputs and add a filepath.Abs normalization"],"exampleFix":"// before\ncachePath, err := GetBuilderAppExecutablePath(appPath)\n// after\nabsPath, _ := filepath.Abs(appPath)\ncachePath, err := GetBuilderAppExecutablePath(absPath)","handlingStrategy":"validation","validationCode":"if !filepath.IsAbs(appPath) {\n    return fmt.Errorf(\"appPath must be absolute, got %q\", appPath)\n}","typeGuard":null,"tryCatchPattern":"if err := runBuild(appId); err != nil {\n    if strings.Contains(err.Error(), \"builder executable path\") { log.Printf(\"bad appPath: %v\", err) }\n}","preventionTips":["Ensure wave home resolves to an absolute path","Normalize paths with filepath.Abs before use","Log appPath early to catch relative-path bugs"],"tags":["go","filesystem","builder"],"backgroundTag":"executable-path-resolution-failed","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}