{"record":{"id":"f2b1a3fa310f4468","repo":"wavetermdev/waveterm","slug":"failed-to-read-app-manifest-w","errorCode":null,"errorMessage":"failed to read app manifest: %w","messagePattern":"failed to read app manifest: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/buildercontroller/buildercontroller.go","lineNumber":307,"sourceCode":"\t\t}\n\t}\n\n\tgo func() {\n\t\t<-process.WaitCh\n\t\tbc.lock.Lock()\n\t\tif bc.process == process {\n\t\t\tbc.process = nil\n\t\t\texitCode := exitCodeFromWaitErr(process.WaitRtn)\n\t\t\tbc.setStatus_nolock(BuilderStatus_Stopped, 0, exitCode, \"\")\n\t\t}\n\t\tbc.lock.Unlock()\n\t}()\n}\n\nfunc (bc *BuilderController) runBuilderApp(ctx context.Context, appId string, appBinPath string, builderEnv map[string]string) (*BuilderProcess, error) {\n\tmanifest, err := waveappstore.ReadAppManifest(appId)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read app manifest: %w\", err)\n\t}\n\n\tsecretBindings, err := waveappstore.ReadAppSecretBindings(appId)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read secret bindings (ERR-SECRET): %w\", err)\n\t}\n\n\tsecretEnv, err := waveappstore.BuildAppSecretEnv(appId, manifest, secretBindings)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to build secret environment (ERR-SECRET): %w\", err)\n\t}\n\n\tif builderEnv == nil {\n\t\tbuilderEnv = make(map[string]string)\n\t}\n\tfor k, v := range secretEnv {\n\t\tbuilderEnv[k] = v\n\t}","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/buildercontroller/buildercontroller.go#L289-L325","documentation":"runBuilderApp starts by reading the app's manifest via waveappstore.ReadAppManifest(appId); this wrapped error indicates the manifest could not be read or parsed, so the process cannot be configured and launched. The build succeeded, but the app metadata layer is broken.","triggerScenarios":"ReadAppManifest fails — manifest file missing from the app dir, malformed JSON, or read permission denied.","commonSituations":"App directory partially deleted (binary kept, manifest removed); manual edits corrupting app.json; a version upgrade changing manifest schema; restrictive file permissions after restore from backup.","solutions":["Check the manifest file exists in the app dir and re-create/reinstall the app if missing","Validate manifest JSON syntax and required fields","Compare manifest schema against the current waveappstore expectations after upgrades","Fix file permissions on the app directory"],"exampleFix":"// before\n// app dir has binary but manifest deleted by cleanup script\n// after\n// reinstall app or restore app.json before runBuilderApp","handlingStrategy":"validation","validationCode":"if _, err := waveappstore.ReadAppManifest(appId); err != nil {\n    return fmt.Errorf(\"manifest invalid, reinstall app: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := runApp(appId); err != nil {\n    if strings.Contains(err.Error(), \"failed to read app manifest\") { /* trigger reinstall */ }\n}","preventionTips":["Never partially delete app directories","Validate manifest JSON after edits","Re-validate manifest schema after wave upgrades"],"tags":["go","manifest","filesystem"],"backgroundTag":"manifest-read-failed","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}