hasura/graphql-engine · error
error in getting server feature flags %w
Error message
error in getting server feature flags %w
What it means
More than one permissions definition was supplied for the same command. Each command may have at most one permissions entry, so the resolver rejects duplicates.
Source
Thrown at cli/cli.go:726
"2) Endpoint should NOT be your GraphQL API, ie endpoint is NOT https://hasura-cloud-app.io/v1/graphql it should be: https://hasura-cloud-app.io",
)
ec.Logger.Info("3) Server might be unhealthy and is not running/accepting API requests")
ec.Logger.Info("4) Admin secret is not correct/set")
ec.Logger.Infoln()
return errors.E(op, err)
}
// get version from the server and match with the cli version
err = ec.checkServerVersion()
if err != nil {
return errors.E(op, fmt.Errorf("version check: %w", err))
}
// get the server feature flags
err = ec.Version.GetServerFeatureFlags()
if err != nil {
return errors.E(op, fmt.Errorf("error in getting server feature flags %w", err))
}
ec.AddRequestHeaders(
map[string]string{GetAdminSecretHeaderName(ec.Version): ec.Config.GetAdminSecret()},
)
ec.Config.HTTPClient.SetHeaders(ec.requestHeaders)
// this populates the ec.Config.ServerConfig.HasuraServerInternalConfig
err = ec.Config.GetHasuraInternalServerConfig(httpClient)
if err != nil {
// If config API is not enabled log it and don't fail
ec.Logger.Debugf(
"cannot get config information from server, this might be because config API is not enabled: %v",
err,
)
}
View on GitHub (pinned to 724551b9ae)
Solutions
- Locate all command permissions entries for the named command and merge/remove duplicates
- Keep a single entry and express role rules within it if the format supports it
- Re-run metadata resolution
Example fix
// before
command_permissions:
- command: create_post
role: admin
- command: create_post
role: user
// after
// merge into the single permissions structure supported for the command Defensive patterns
Strategy: validation
Validate before calling
let dupes: Vec<_> = command_permissions.iter().map(|p| p.command.as_str()).duplicates().collect();
assert!(dupes.is_empty(), "duplicate command permissions: {dupes:?}"); Prevention
- Keep one permissions block per command; use code-gen instead of manual duplication
- Run duplicate-detection on permissions in CI
When it happens
Trigger: Defining two command permission blocks referencing the same Qualified<CommandName> in the metadata.
Common situations: Copy-pasting a permissions block for a second role without changing the command; merging metadata from multiple sources that both configure the same command; appending instead of editing during automated metadata generation.
Related errors
- the following command is defined more than once: {name:}
- the following argument in command {command_name:} is defined
- source for the following command is defined more than once:
- multiple output type permissions have been defined for type:
- parsing 'admin_secrets' from config.yaml / environment varia
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/bc779decd961d36c.
Report an issue: GitHub.