wavetermdev/waveterm · error

builder appid not set for builderid: %s

Error message

builder appid not set for builderid: %s

What it means

StartBuilderCommand reads rtInfo.BuilderAppId to know which wave app the builder should build. If the RTInfo exists but BuilderAppId was never set, the server cannot start the build and returns this error.

Source

Thrown at pkg/wshrpc/wshserver/wshserver.go:1148

	if builderId == "" {
		return fmt.Errorf("must provide a builderId to DeleteBuilderCommand")
	}
	buildercontroller.DeleteController(builderId)
	return nil
}

func (ws *WshServer) StartBuilderCommand(ctx context.Context, data wshrpc.CommandStartBuilderData) error {
	if data.BuilderId == "" {
		return fmt.Errorf("must provide a builderId to StartBuilderCommand")
	}
	bc := buildercontroller.GetOrCreateController(data.BuilderId)
	rtInfo := wstore.GetRTInfo(waveobj.MakeORef("builder", data.BuilderId))
	if rtInfo == nil {
		return fmt.Errorf("builder rtinfo not found for builderid: %s", data.BuilderId)
	}
	appId := rtInfo.BuilderAppId
	if appId == "" {
		return fmt.Errorf("builder appid not set for builderid: %s", data.BuilderId)
	}
	return bc.Start(ctx, appId, rtInfo.BuilderEnv)
}

func (ws *WshServer) StopBuilderCommand(ctx context.Context, builderId string) error {
	if builderId == "" {
		return fmt.Errorf("must provide a builderId to StopBuilderCommand")
	}
	bc := buildercontroller.GetController(builderId)
	if bc == nil {
		return nil
	}
	return bc.Stop()
}

func (ws *WshServer) RestartBuilderAndWaitCommand(ctx context.Context, data wshrpc.CommandRestartBuilderAndWaitData) (*wshrpc.RestartBuilderAndWaitResult, error) {
	if data.BuilderId == "" {
		return nil, fmt.Errorf("must provide a builderId to RestartBuilderAndWaitCommand")

View on GitHub (pinned to a4447c1563)

Solutions

  1. Set the builder's app association (BuilderAppId in RTInfo) before starting
  2. Re-link the builder to an existing app in the UI/config
  3. Recreate the builder with the app attached

Example fix

// before
rtInfo.BuilderEnv = env // BuilderAppId never set
// after
rtInfo.BuilderAppId = appId
rtInfo.BuilderEnv = env
wstore.UpdateRTInfo(rtInfo)
Defensive patterns

Strategy: validation

Validate before calling

rtInfo := wstore.GetRTInfo(waveobj.MakeORef("builder", builderId))
if rtInfo == nil || rtInfo.BuilderAppId == "" {
    return fmt.Errorf("builder %q is not linked to an app", builderId)
}
err := client.StartBuilderCommand(ctx, wshrpc.CommandStartBuilderData{BuilderId: builderId})

Type guard

func builderHasApp(rtInfo *wstore.RTInfo) bool {
    return rtInfo != nil && rtInfo.BuilderAppId != ""
}

Try / catch

if err := client.StartBuilderCommand(ctx, data); err != nil {
    if strings.Contains(err.Error(), "appid not set") {
        // guide user to link builder to an app, then retry
    }
    return err
}

Prevention

When it happens

Trigger: Calling StartBuilderCommand for a builder whose RTInfo lacks BuilderAppId — e.g. the builder was created but never associated with an app, or the association was cleared.

Common situations: Builders created through an incomplete setup flow; app deletion leaving a dangling builder; manual wstore edits or migration bugs that dropped BuilderAppId.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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