{"record":{"id":"98e46022f484e104","repo":"microsoft/aspire","slug":"unknown-issuer-spec-type-issuer-spec-gettype-name-on-issuer","errorCode":null,"errorMessage":"Unknown issuer spec type '{issuer.Spec?.GetType().Name}' on issuer '{issuer.Name}'.","messagePattern":"Unknown issuer spec type '(.+?)' on issuer '(.+?)'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.Kubernetes/CertManagerExtensions.cs","lineNumber":598,"sourceCode":"        {\n            case CertManagerAcmeIssuerSpec acme:\n                {\n                    var server = await acme.ServerUrl.GetValueAsync(cancellationToken).ConfigureAwait(false);\n                    var email = await acme.Email.GetValueAsync(cancellationToken).ConfigureAwait(false);\n                    sb.AppendLine(\"  acme:\");\n                    sb.Append(\"    server: \").AppendLine(server);\n                    sb.Append(\"    email: \").AppendLine(email);\n                    sb.AppendLine(\"    privateKeySecretRef:\");\n                    sb.Append(\"      name: \").Append(k8sIssuerName).AppendLine(\"-account-key\");\n                    sb.AppendLine(\"    solvers:\");\n                    foreach (var solver in issuer.Solvers)\n                    {\n                        AppendSolver(sb, solver, model, certManager, issuer, logger);\n                    }\n                    break;\n                }\n            default:\n                throw new InvalidOperationException(\n                    $\"Unknown issuer spec type '{issuer.Spec?.GetType().Name}' on issuer '{issuer.Name}'.\");\n        }\n\n        return sb.ToString();\n    }\n\n    private static void AppendSolver(\n        StringBuilder sb,\n        CertManagerSolverConfig solver,\n        ApplicationModel.DistributedApplicationModel model,\n        CertManagerResource certManager,\n        CertManagerIssuerResource issuer,\n        ILogger logger)\n    {\n        switch (solver)\n        {\n            case CertManagerHttp01SolverConfig:\n                {","sourceCodeStart":580,"sourceCodeEnd":616,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.Kubernetes/CertManagerExtensions.cs#L580-L616","documentation":"BuildClusterIssuerManifestAsync switches on the concrete type of issuer.Spec to render the manifest; the default arm throws InvalidOperationException for any Spec type the publisher does not know how to serialize. This indicates either a newer/unknown spec type was configured or a custom spec object was attached.","triggerScenarios":"issuer.Spec holds a type outside the supported set (e.g. a custom ACME spec variant or a spec from a different cert-manager library version) when the manifest is being generated during publish.","commonSituations":"Upgrading Aspire or mixing custom CertManagerIssuerResource spec implementations, or writing a custom extension that sets an unsupported Spec type.","solutions":["Use only the built-in configuration methods (WithLetsEncryptProduction/Staging, WithAcmeServer) that set supported spec types.","If you wrote a custom spec type, add support for it in manifest generation or switch to a supported one.","Check package versions so the spec types match the publisher's expectations."],"exampleFix":"// before\nissuer.Spec = new MyCustomAcmeSpec();\n\n// after\nissuerBuilder.WithAcmeServer(new Uri(\"https://acme.example.com/directory\"), email);","handlingStrategy":"type-guard","validationCode":"if (issuer.Spec is not (null or KnownAcmeSpec)) throw new InvalidOperationException(\"Unsupported issuer spec type\");","typeGuard":"bool IsSupportedSpec(object? spec) => spec is null or KnownAcmeSpec;","tryCatchPattern":"try { await manifestBuilder.BuildAsync(); }\ncatch (InvalidOperationException ex) when (ex.Message.StartsWith(\"Unknown issuer spec type\")) { /* switch to built-in config methods */ throw; }","preventionTips":["Only set Spec via built-in With* extension methods.","Keep Aspire.Kubernetes package versions in sync across the app host."],"tags":["kubernetes","cert-manager","manifest","unsupported-type"],"backgroundTag":"unsupported-enum-value","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}