SigNoz/signoz · error · errors.Error
CodeLicenseUnavailable
CodeLicenseUnavailable
Error message
a valid license is not available
What it means
Thrown by buildDeltaMetricQueryForTable in SigNoz's metrics v3 query builder when a PromQL/ClickHouse metric query destined for a table (non-time-series) view uses AggregateOperatorRate. The builder's switch on mq.AggregateOperator has no meaningful table-view equivalent for a raw 'rate' aggregation (a TODO in the source acknowledges the open question), so it refuses to build the SQL.
Source
Thrown at ee/authn/callbackauthn/oidccallbackauthn/authn.go:81
func (a *AuthN) HandleCallback(ctx context.Context, query url.Values) (*authtypes.CallbackIdentity, error) {
if err := query.Get("error"); err != "" {
return nil, errors.Newf(errors.TypeInternal, errors.CodeInternal, "oidc: error while authenticating").WithAdditional(query.Get("error_description"))
}
state, err := authtypes.NewStateFromString(query.Get("state"))
if err != nil {
return nil, errors.Newf(errors.TypeInvalidInput, authtypes.ErrCodeInvalidState, "oidc: invalid state").WithAdditional(err.Error())
}
authDomain, err := a.store.GetAuthDomainFromID(ctx, state.DomainID)
if err != nil {
return nil, err
}
_, err = a.licensing.GetActive(ctx, authDomain.StorableAuthDomain().OrgID)
if err != nil {
return nil, errors.New(errors.TypeLicenseUnavailable, errors.CodeLicenseUnavailable, "a valid license is not available").WithAdditional("this feature requires a valid license").WithAdditional(err.Error())
}
oidcConfig, err := authDomain.Config().OIDCConfig()
if err != nil {
return nil, err
}
oidcProvider, oauth2Config, err := a.oidcProviderAndoauth2Config(ctx, state.URL, authDomain)
if err != nil {
return nil, err
}
ctx = context.WithValue(ctx, oauth2.HTTPClient, a.httpClient.Client())
token, err := oauth2Config.Exchange(ctx, query.Get("code"))
if err != nil {
var retrieveError *oauth2.RetrieveError
if errors.As(err, &retrieveError) {
return nil, errors.Newf(errors.TypeForbidden, errors.CodeForbidden, "oidc: failed to get token").WithAdditional(retrieveError.ErrorDescription).WithAdditional(string(retrieveError.Body))View on GitHub (pinned to 5069bf80b0)
Solutions
- Change the aggregate operator to a table-supported variant such as sum_rate, avg_rate, min_rate or max_rate, which the builder converts to op(value)/step
- If you need rate semantics, keep the panel as a time-series (graph) view instead of table
- If table+rate must be supported, patch delta_table.go to map rate to one of the *_RATE branches and upstream the change (note the source TODO)
Example fix
// before qb := v3.AggregateOperatorRate query, err := metrics_v3.PrepareMetricQuery(ctx, ... qb, v3.FormatTable ...) // after qb := v3.AggregateOperatorSumRate // table view supports the explicit *_RATE ops query, err := metrics_v3.PrepareMetricQuery(ctx, ... qb, v3.FormatTable ...)
Defensive patterns
Strategy: validation
Validate before calling
func isTableSupportedOp(op v3.AggregateOperator) bool {
switch op {
case v3.AggregateOperatorSumRate, v3.AggregateOperatorAvgRate,
v3.AggregateOperatorMaxRate, v3.AggregateOperatorMinRate,
v3.AggregateOperatorSum, v3.AggregateOperatorAvg,
v3.AggregateOperatorMin, v3.AggregateOperatorMax,
v3.AggregateOperatorCount, v3.AggregateOperatorCountDistinct:
return true
}
return false
}
if format == v3.FormatTable && !isTableSupportedOp(qp.AggregateOperator) {
return fmt.Errorf("operator %q unsupported in table view; use a *_rate operator", qp.AggregateOperator)
} Type guard
null
Try / catch
if _, err := v3.PrepareMetricQuery(...); err != nil {
if strings.Contains(err.Error(), "not supported for table view") {
// retry with AggregateOperatorSumRate or switch panel to graph
}
} Prevention
- Encode operator/format compatibility in your panel schema
- Pre-validate operators before calling PrepareMetricQuery
- Keep rate() visualizations in graph panels
When it happens
Trigger: Calling PrepareMetricQuery (directly or via the /api/v1/query_range or dashboard APIs) with a v3.QueryBuildPacket whose AggregateAttribute/AggregateOperator is v3.AggregateOperatorRate while the requested output format is a table view (e.g. panel type 'table' or 'list'), causing the delta table builder path to be selected.
Common situations: Switching a SigNoz dashboard panel from graph to table while it uses a rate() aggregation; copying a widget config from a graph panel to a table widget; programmatically generating panels from templates that default to rate for counter metrics.
Related errors
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/ba096f630a28676f.
Report an issue: GitHub.