{"record":{"id":"19d16d7c07bc062e","repo":"wavetermdev/waveterm","slug":"builder-rtinfo-not-found-for-builderid-s","errorCode":null,"errorMessage":"builder rtinfo not found for builderid: %s","messagePattern":"builder rtinfo not found for builderid: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/wshrpc/wshserver/wshserver.go","lineNumber":1144,"sourceCode":"\treturn waveappstore.WriteAppSecretBindings(data.AppId, data.Bindings)\n}\n\nfunc (ws *WshServer) DeleteBuilderCommand(ctx context.Context, builderId string) error {\n\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}","sourceCodeStart":1126,"sourceCodeEnd":1162,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/wshrpc/wshserver/wshserver.go#L1126-L1162","documentation":"After validating BuilderId, StartBuilderCommand looks up the builder's runtime info via wstore.GetRTInfo on the ORef (\"builder\", builderId). If no RTInfo exists for that id, the server cannot determine which app to build or what env to use, and returns this error.","triggerScenarios":"Calling StartBuilderCommand with a BuilderId that has no RTInfo entry in wstore — the builder object was deleted, the id is mistyped/stale, or RTInfo was never persisted for this builder.","commonSituations":"Using a cached builder id after the builder was removed; cross-workspace calls where the builder exists in a different workspace's store; a crash during builder creation that left the id without RTInfo.","solutions":["Confirm the builder exists (wstore list / UI) and use its current id","Recreate the builder if its RTInfo record was lost","Refresh client-side builder state to purge stale ids"],"exampleFix":"// before\nbc := buildercontroller.GetOrCreateController(staleId)\nrtInfo := wstore.GetRTInfo(waveobj.MakeORef(\"builder\", staleId)) // nil\n// after\nif wstore.GetRTInfo(waveobj.MakeORef(\"builder\", builderId)) == nil {\n    return fmt.Errorf(\"builder %q does not exist\", builderId)\n}","handlingStrategy":"validation","validationCode":"rtInfo := wstore.GetRTInfo(waveobj.MakeORef(\"builder\", builderId))\nif rtInfo == nil {\n    return fmt.Errorf(\"builder %q has no RTInfo; cannot start\", builderId)\n}\nerr := client.StartBuilderCommand(ctx, wshrpc.CommandStartBuilderData{BuilderId: builderId})","typeGuard":"func builderExists(builderId string) bool {\n    return builderId != \"\" && wstore.GetRTInfo(waveobj.MakeORef(\"builder\", builderId)) != nil\n}","tryCatchPattern":"if err := client.StartBuilderCommand(ctx, data); err != nil {\n    if strings.Contains(err.Error(), \"rtinfo not found\") {\n        // refresh builder list, drop stale id, surface 'builder no longer exists'\n    }\n    return err\n}","preventionTips":["Refresh cached builder ids after workspace/subscribe updates","Delete client-side references when a builder is removed","Use OIDs (from wstore), never names, as BuilderId"],"tags":["rpc","state","missing-record"],"backgroundTag":"entity-not-found","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}