{"record":{"id":"09ca29029197a5dc","repo":"hasura/graphql-engine","slug":"error-in-fetching-codegen-frameworks-w","errorCode":null,"errorMessage":"error in fetching codegen frameworks: %w","messagePattern":"error in fetching codegen frameworks: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/actions_use_codegen.go","lineNumber":123,"sourceCode":"func (o *actionsUseCodegenOptions) run() error {\n\tvar op errors.Op = \"commands.actionsUseCodegenOptions.run\"\n\n\to.EC.Spin(\"Ensuring codegen-assets repo is updated...\")\n\tdefer o.EC.Spinner.Stop()\n\t// ensure the actions-codegen repo is updated\n\terr := o.EC.CodegenAssetsRepo.EnsureUpdated()\n\tif err != nil {\n\t\to.EC.Logger.Warnf(\"unable to update codegen-assets repo, got %v\", err)\n\t}\n\n\tnewCodegenExecutionConfig := o.EC.Config.ActionConfig.Codegen\n\tnewCodegenExecutionConfig.Framework = \"\"\n\n\to.EC.Spin(\"Fetching frameworks...\")\n\n\tallFrameworks, err := getCodegenFrameworks()\n\tif err != nil {\n\t\treturn errors.E(op, fmt.Errorf(\"error in fetching codegen frameworks: %w\", err))\n\t}\n\n\to.EC.Spinner.Stop()\n\n\tif o.framework == \"\" {\n\t\t// if framework flag is not provided, display a list and allow them to choose\n\t\tvar frameworkList []string\n\t\tfor _, f := range allFrameworks {\n\t\t\tframeworkList = append(frameworkList, f.Name)\n\t\t}\n\n\t\tsort.Strings(frameworkList)\n\n\t\tnewCodegenExecutionConfig.Framework, err = util.GetSelectPrompt(\n\t\t\t\"Choose a codegen framework to use\",\n\t\t\tframeworkList,\n\t\t)\n\t\tif err != nil {","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/actions_use_codegen.go#L105-L141","documentation":"Thrown when getCodegenFrameworks() fails while `hasura actions use-codegen` tries to list available codegen frameworks. That helper reads the frameworks manifest from the locally cloned codegen-assets repo (guaranteed present by PreRunE), so failure means the manifest file is missing or unparseable.","triggerScenarios":"Running use-codegen when the cloned codegen-assets repo lacks the expected frameworks definition file — typically a stale/partial clone, a CLI version expecting a manifest layout the cloned repo doesn't have, or files deleted after PreRunE ran.","commonSituations":"Upgraded CLI but old clone cached in home dir; clone interrupted mid-checkout; antivirus/permissions removing files from the clone.","solutions":["Delete the local codegen-assets clone directory so the next run pulls a fresh, version-matched copy.","Upgrade (or pin) the Hasura CLI to the version whose assets layout you cloned.","Re-run `hasura actions use-codegen` after the fresh clone."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"test -d \"$HOME/.hasura/codegen-assets\" && find \"$HOME/.hasura/codegen-assets\" -name '*framework*' | grep -q .","typeGuard":null,"tryCatchPattern":"Catch, delete the codegen-assets clone so PreRunE re-pulls a fresh manifest, and retry.","preventionTips":["Refresh the clone after CLI upgrades.","Don't manually edit files inside the clone."],"tags":["codegen","hasura-cli","manifest","filesystem"],"backgroundTag":"manifest-read-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}