temporalio/temporal · error

unable to find archiver config for the given scheme

Error message

unable to find archiver config for the given scheme

What it means

ErrArchiverConfigNotFound is the sentinel exported by common/archiver/provider indicating the scheme is known but no configuration block was provided for it. In GetHistoryArchiver/GetVisibilityArchiver, each built-in scheme case checks its config (e.g. historyArchiverConfigs.S3store); if nil, this error is returned instead of constructing the archiver.

Source

Thrown at common/archiver/provider/provider.go:23

import (
	"errors"
	"sync"

	"go.temporal.io/server/common/archiver"
	"go.temporal.io/server/common/archiver/filestore"
	"go.temporal.io/server/common/archiver/gcloud"
	"go.temporal.io/server/common/archiver/s3store"
	"go.temporal.io/server/common/config"
	"go.temporal.io/server/common/log"
	"go.temporal.io/server/common/metrics"
	"go.temporal.io/server/common/persistence"
)

var (
	// ErrUnknownScheme is the error for unknown archiver scheme
	ErrUnknownScheme = errors.New("unknown archiver scheme")
	// ErrArchiverConfigNotFound is the error for unable to find the config for an archiver given scheme
	ErrArchiverConfigNotFound = errors.New("unable to find archiver config for the given scheme")
)

type (
	// ArchiverProvider returns history or visibility archiver based on the scheme.
	// The archiver for each scheme will be created only once and cached.
	ArchiverProvider interface {
		GetHistoryArchiver(scheme string) (archiver.HistoryArchiver, error)
		GetVisibilityArchiver(scheme string) (archiver.VisibilityArchiver, error)
	}

	// NewCustomHistoryArchiverParams provides dependencies for constructing a history archiver.
	NewCustomHistoryArchiverParams struct {
		Scheme           string
		ExecutionManager persistence.ExecutionManager
		Logger           log.Logger
		MetricsHandler   metrics.Handler
		Configs          map[string]any
	}

View on GitHub (pinned to bde624efd1)

Solutions

  1. Add the matching archiver config block (e.g. `archival.historyArchiverProvider.s3store` with region/bucket settings) to the server config for the scheme used by the namespace URI.
  2. Verify the config YAML keys are correctly nested so HistoryArchiverProvider/VisibilityArchiverProvider fields are populated, not left nil.
  3. If the namespace should not archive with that scheme, change its archival URI scheme to one that is configured.
  4. Distinguish from ErrUnknownScheme with errors.Is to confirm the scheme is right and only config is missing.

Example fix

// config before (scheme s3 recognized but no config)
archival:
  historyArchiverProvider: {}

// config after
archival:
  historyArchiverProvider:
    s3store:
      region: us-east-1
      logLevel: "error"
Defensive patterns

Strategy: validation

Validate before calling

if cfg.Archival.HistoryArchiverProvider != nil && cfg.Archival.HistoryArchiverProvider.S3store == nil && namespaceUsesS3 {
	return errors.New("s3 archival URI configured but archival.historyArchiverProvider.s3store is missing")
}

Type guard

func isArchiverConfigNotFound(err error) bool { return errors.Is(err, provider.ErrArchiverConfigNotFound) }

Try / catch

archiver, err := archiverProvider.GetHistoryArchiver(scheme)
if err != nil {
	if errors.Is(err, provider.ErrArchiverConfigNotFound) {
		return nil, fmt.Errorf("archiver scheme %q needs a config block in archival config", scheme)
	}
	return nil, err
}

Prevention

When it happens

Trigger: Calling GetHistoryArchiver("s3") while config.HistoryArchiverProvider.S3store is nil (same for Filestore, Gstorage, and the visibility equivalents). The scheme must be recognized — otherwise you get ErrUnknownScheme instead.

Common situations: A namespace's archival URI uses s3/gs/filestore but the server's persistence/archival config omits the corresponding archiver section; enabling archival per-namespace without global archival config; typo causing config to load under the wrong key; config struct left nil in tests.

Related errors


AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01). Data as JSON: /api/errors/74f88f98b01772c7. Report an issue: GitHub.