{"record":{"id":"74f88f98b01772c7","repo":"temporalio/temporal","slug":"unable-to-find-archiver-config-for-the-given-schem","errorCode":null,"errorMessage":"unable to find archiver config for the given scheme","messagePattern":"unable to find archiver config for the given scheme","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/archiver/provider/provider.go","lineNumber":23,"sourceCode":"import (\n\t\"errors\"\n\t\"sync\"\n\n\t\"go.temporal.io/server/common/archiver\"\n\t\"go.temporal.io/server/common/archiver/filestore\"\n\t\"go.temporal.io/server/common/archiver/gcloud\"\n\t\"go.temporal.io/server/common/archiver/s3store\"\n\t\"go.temporal.io/server/common/config\"\n\t\"go.temporal.io/server/common/log\"\n\t\"go.temporal.io/server/common/metrics\"\n\t\"go.temporal.io/server/common/persistence\"\n)\n\nvar (\n\t// ErrUnknownScheme is the error for unknown archiver scheme\n\tErrUnknownScheme = errors.New(\"unknown archiver scheme\")\n\t// ErrArchiverConfigNotFound is the error for unable to find the config for an archiver given scheme\n\tErrArchiverConfigNotFound = errors.New(\"unable to find archiver config for the given scheme\")\n)\n\ntype (\n\t// ArchiverProvider returns history or visibility archiver based on the scheme.\n\t// The archiver for each scheme will be created only once and cached.\n\tArchiverProvider interface {\n\t\tGetHistoryArchiver(scheme string) (archiver.HistoryArchiver, error)\n\t\tGetVisibilityArchiver(scheme string) (archiver.VisibilityArchiver, error)\n\t}\n\n\t// NewCustomHistoryArchiverParams provides dependencies for constructing a history archiver.\n\tNewCustomHistoryArchiverParams struct {\n\t\tScheme           string\n\t\tExecutionManager persistence.ExecutionManager\n\t\tLogger           log.Logger\n\t\tMetricsHandler   metrics.Handler\n\t\tConfigs          map[string]any\n\t}","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/archiver/provider/provider.go#L5-L41","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","Verify the config YAML keys are correctly nested so HistoryArchiverProvider/VisibilityArchiverProvider fields are populated, not left nil.","If the namespace should not archive with that scheme, change its archival URI scheme to one that is configured.","Distinguish from ErrUnknownScheme with errors.Is to confirm the scheme is right and only config is missing."],"exampleFix":"// config before (scheme s3 recognized but no config)\narchival:\n  historyArchiverProvider: {}\n\n// config after\narchival:\n  historyArchiverProvider:\n    s3store:\n      region: us-east-1\n      logLevel: \"error\"","handlingStrategy":"validation","validationCode":"if cfg.Archival.HistoryArchiverProvider != nil && cfg.Archival.HistoryArchiverProvider.S3store == nil && namespaceUsesS3 {\n\treturn errors.New(\"s3 archival URI configured but archival.historyArchiverProvider.s3store is missing\")\n}","typeGuard":"func isArchiverConfigNotFound(err error) bool { return errors.Is(err, provider.ErrArchiverConfigNotFound) }","tryCatchPattern":"archiver, err := archiverProvider.GetHistoryArchiver(scheme)\nif err != nil {\n\tif errors.Is(err, provider.ErrArchiverConfigNotFound) {\n\t\treturn nil, fmt.Errorf(\"archiver scheme %q needs a config block in archival config\", scheme)\n\t}\n\treturn nil, err\n}","preventionTips":["Add a config validation step at server startup that every scheme referenced by any namespace URI has a matching provider config block.","Keep archival config YAML keys and namespace URI schemes in one documented place.","Write a unit test constructing the provider from production config files to catch nil blocks early."],"tags":["archival","provider","configuration","missing-config"],"backgroundTag":"missing-archiver-config","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}