{"record":{"id":"00f474c2c4f5ca02","repo":"wavetermdev/waveterm","slug":"builder-appid-not-set-for-builderid-s","errorCode":null,"errorMessage":"builder appid not set for builderid: %s","messagePattern":"builder appid not set for builderid: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/wshrpc/wshserver/wshserver.go","lineNumber":1148,"sourceCode":"\tif builderId == \"\" {\n\t\treturn fmt.Errorf(\"must provide a builderId to DeleteBuilderCommand\")\n\t}\n\tbuildercontroller.DeleteController(builderId)\n\treturn nil\n}\n\nfunc (ws *WshServer) StartBuilderCommand(ctx context.Context, data wshrpc.CommandStartBuilderData) error {\n\tif data.BuilderId == \"\" {\n\t\treturn fmt.Errorf(\"must provide a builderId to StartBuilderCommand\")\n\t}\n\tbc := buildercontroller.GetOrCreateController(data.BuilderId)\n\trtInfo := wstore.GetRTInfo(waveobj.MakeORef(\"builder\", data.BuilderId))\n\tif rtInfo == nil {\n\t\treturn fmt.Errorf(\"builder rtinfo not found for builderid: %s\", data.BuilderId)\n\t}\n\tappId := rtInfo.BuilderAppId\n\tif appId == \"\" {\n\t\treturn fmt.Errorf(\"builder appid not set for builderid: %s\", data.BuilderId)\n\t}\n\treturn bc.Start(ctx, appId, rtInfo.BuilderEnv)\n}\n\nfunc (ws *WshServer) StopBuilderCommand(ctx context.Context, builderId string) error {\n\tif builderId == \"\" {\n\t\treturn fmt.Errorf(\"must provide a builderId to StopBuilderCommand\")\n\t}\n\tbc := buildercontroller.GetController(builderId)\n\tif bc == nil {\n\t\treturn nil\n\t}\n\treturn bc.Stop()\n}\n\nfunc (ws *WshServer) RestartBuilderAndWaitCommand(ctx context.Context, data wshrpc.CommandRestartBuilderAndWaitData) (*wshrpc.RestartBuilderAndWaitResult, error) {\n\tif data.BuilderId == \"\" {\n\t\treturn nil, fmt.Errorf(\"must provide a builderId to RestartBuilderAndWaitCommand\")","sourceCodeStart":1130,"sourceCodeEnd":1166,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/wshrpc/wshserver/wshserver.go#L1130-L1166","documentation":"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.","triggerScenarios":"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.","commonSituations":"Builders created through an incomplete setup flow; app deletion leaving a dangling builder; manual wstore edits or migration bugs that dropped BuilderAppId.","solutions":["Set the builder's app association (BuilderAppId in RTInfo) before starting","Re-link the builder to an existing app in the UI/config","Recreate the builder with the app attached"],"exampleFix":"// before\nrtInfo.BuilderEnv = env // BuilderAppId never set\n// after\nrtInfo.BuilderAppId = appId\nrtInfo.BuilderEnv = env\nwstore.UpdateRTInfo(rtInfo)","handlingStrategy":"validation","validationCode":"rtInfo := wstore.GetRTInfo(waveobj.MakeORef(\"builder\", builderId))\nif rtInfo == nil || rtInfo.BuilderAppId == \"\" {\n    return fmt.Errorf(\"builder %q is not linked to an app\", builderId)\n}\nerr := client.StartBuilderCommand(ctx, wshrpc.CommandStartBuilderData{BuilderId: builderId})","typeGuard":"func builderHasApp(rtInfo *wstore.RTInfo) bool {\n    return rtInfo != nil && rtInfo.BuilderAppId != \"\"\n}","tryCatchPattern":"if err := client.StartBuilderCommand(ctx, data); err != nil {\n    if strings.Contains(err.Error(), \"appid not set\") {\n        // guide user to link builder to an app, then retry\n    }\n    return err\n}","preventionTips":["Enforce app association during builder creation flow","Cascade-clean or re-link builders when an app is deleted","Validate RTInfo fields after any wstore migration"],"tags":["rpc","configuration","missing-record"],"backgroundTag":"missing-required-argument","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}