wavetermdev/waveterm · error

failed to get builder executable path: %w

Error message

failed to get builder executable path: %w

What it means

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.

Source

Thrown at pkg/buildercontroller/buildercontroller.go:208

	return nil
}

func (bc *BuilderController) buildAndRun(ctx context.Context, appId string, builderEnv map[string]string, resultCh chan<- *BuildResult) {
	appNS, _, err := waveappstore.ParseAppId(appId)
	if err != nil {
		bc.handleBuildError(fmt.Errorf("failed to parse app id: %w", err), resultCh)
		return
	}

	appPath, err := waveappstore.GetAppDir(appId)
	if err != nil {
		bc.handleBuildError(fmt.Errorf("failed to get app directory: %w", err), resultCh)
		return
	}

	cachePath, err := GetBuilderAppExecutablePath(appPath)
	if err != nil {
		bc.handleBuildError(fmt.Errorf("failed to get builder executable path: %w", err), resultCh)
		return
	}

	nodePath := wavebase.GetWaveAppElectronExecPath()
	if nodePath == "" {
		bc.handleBuildError(fmt.Errorf("electron executable path not set"), resultCh)
		return
	}

	scaffoldPath := waveapputil.GetTsunamiScaffoldPath()
	settings := wconfig.GetWatcher().GetFullConfig().Settings
	sdkReplacePath := settings.TsunamiSdkReplacePath
	sdkVersion := settings.TsunamiSdkVersion
	if sdkVersion == "" {
		sdkVersion = waveapputil.DefaultTsunamiSdkVersion
	}
	goPath := settings.TsunamiGoPath

View on GitHub (pinned to a4447c1563)

Solutions

  1. Ensure the wave home/app storage resolves to absolute paths
  2. Log appPath and confirm it is absolute before calling GetBuilderAppExecutablePath
  3. Fix environment (WAVE_HOME) so GetAppDir returns a proper absolute directory
  4. Verify GetBuilderAppExecutablePath inputs and add a filepath.Abs normalization

Example fix

// before
cachePath, err := GetBuilderAppExecutablePath(appPath)
// after
absPath, _ := filepath.Abs(appPath)
cachePath, err := GetBuilderAppExecutablePath(absPath)
Defensive patterns

Strategy: validation

Validate before calling

if !filepath.IsAbs(appPath) {
    return fmt.Errorf("appPath must be absolute, got %q", appPath)
}

Try / catch

if err := runBuild(appId); err != nil {
    if strings.Contains(err.Error(), "builder executable path") { log.Printf("bad appPath: %v", err) }
}

Prevention

When it happens

Trigger: GetBuilderAppExecutablePath receives a relative or empty appPath and refuses to construct the executable cache path; upstream GetAppDir returned a non-absolute path.

Common situations: Wave home directory misconfiguration causing relative app paths; custom WAVE_HOME with unusual setup; storage layer returning degraded paths.

Related errors


AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01). Data as JSON: /api/errors/0fedf914e1417a20. Report an issue: GitHub.