{"record":{"id":"fb2de582c671ec25","repo":"caddyserver/caddy","slug":"loading-ech-publication-modules-v","errorCode":null,"errorMessage":"loading ECH publication modules: %v","messagePattern":"loading ECH publication modules: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/caddytls/ech.go","lineNumber":90,"sourceCode":"\tconfigsMu   *sync.RWMutex                 // protects both configs and the list of configs/keys the standard library uses\n\tconfigs     map[string][]echConfig        // map of public_name to list of configs\n\tstdlibReady []tls.EncryptedClientHelloKey // ECH configs+keys in a format the standard library can use\n}\n\n// Provision loads or creates ECH configs and returns outer names (for certificate\n// management), but does not publish any ECH configs. The DNS module is used as\n// a default for later publishing if needed.\nfunc (ech *ECH) Provision(ctx caddy.Context) ([]string, error) {\n\tech.configsMu = new(sync.RWMutex)\n\n\tlogger := ctx.Logger().Named(\"ech\")\n\n\t// set up publication modules before we need to obtain a lock in storage,\n\t// since this is strictly internal and doesn't require synchronization\n\tfor i, pub := range ech.Publication {\n\t\tmods, err := ctx.LoadModule(pub, \"PublishersRaw\")\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"loading ECH publication modules: %v\", err)\n\t\t}\n\t\tfor _, modIface := range mods.(map[string]any) {\n\t\t\tech.Publication[i].publishers = append(ech.Publication[i].publishers, modIface.(ECHPublisher))\n\t\t}\n\t}\n\n\t// the rest of provisioning needs an exclusive lock so that instances aren't\n\t// stepping on each other when setting up ECH configs\n\tstorage := ctx.Storage()\n\tif err := storage.Lock(ctx, echStorageLockName); err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() {\n\t\tif err := storage.Unlock(ctx, echStorageLockName); err != nil {\n\t\t\tlogger.Error(\"unable to unlock ECH provisioning in storage\", zap.Error(err))\n\t\t}\n\t}()\n","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/caddytls/ech.go#L72-L108","documentation":"Error \"loading ECH publication modules: %v\" thrown in caddyserver/caddy.","triggerScenarios":"Thrown at modules/caddytls/ech.go:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the ECH publication module names and configuration; the wrapped error identifies the failing module."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}