{"record":{"id":"79073338b387f304","repo":"microsoft/semantic-kernel","slug":"impossible-to-find-protobuf-type-name-correspondin","errorCode":null,"errorMessage":"Impossible to find protobuf type name corresponding to '{type}' type.","messagePattern":"Impossible to find protobuf type name corresponding to '(.+?)' type\\.","errorType":"exception","errorClass":"KernelException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Functions/Functions.Grpc/Protobuf/ProtoDocumentParser.cs","lineNumber":135,"sourceCode":"    /// <summary>\n    /// Returns protobuf data type name.\n    /// </summary>\n    /// <param name=\"type\">Type descriptor.</param>\n    /// <returns>The protobuf data type name.</returns>\n    private static string GetProtobufDataTypeName(FieldDescriptorProto.Type type)\n    {\n        var fieldInfo = typeof(FieldDescriptorProto.Type).GetField(type.ToString());\n        if (fieldInfo is not null)\n        {\n            //Get protobuf type name from enum attribute - [global::ProtoBuf.ProtoEnum(Name = @\"TYPE_DOUBLE\")]\n            var attribute = (ProtoEnumAttribute?)Attribute.GetCustomAttribute(fieldInfo, typeof(ProtoEnumAttribute));\n            if (attribute is not null)\n            {\n                return attribute.Name;\n            }\n        }\n\n        throw new KernelException($\"Impossible to find protobuf type name corresponding to '{type}' type.\");\n    }\n}\n","sourceCodeStart":117,"sourceCodeEnd":138,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Functions/Functions.Grpc/Protobuf/ProtoDocumentParser.cs#L117-L138","documentation":"Thrown by GetProtobufTypeName when, for a given FieldDescriptorProto.Type enum value, either the enum field is not found via reflection or its ProtoEnumAttribute (which carries the `TYPE_*` name) is absent. The attribute lookup is the mechanism mapping CLR enum values back to protobuf type tokens; a missing attribute breaks that mapping.","triggerScenarios":"A FieldDescriptorProto.Type value that lacks the `[ProtoEnum(Name=...)]` attribute — typically from a version mismatch in the protobuf-net/protobuf schema assembly, or an unexpected enum member.","commonSituations":"Upgrading the protobuf descriptor library to a version that changed enum attributes; encountering a field type enum member the attribute-based lookup wasn't prepared for.","solutions":["Pin or align the protobuf descriptor library version with the one this runner was built against.","Avoid field types that surface unmapped enum members (see also error 595).","If reproducible, report it — missing attributes on a shipping enum is a library/compat defect."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { /* parse */ }\ncatch (KernelException ex) when (ex.Message.Contains(\"Impossible to find protobuf type name\")) {\n    // likely a descriptor-library version mismatch; align versions\n}","preventionTips":["Pin the protobuf descriptor library version.","Avoid field types that surface unmapped enum members."],"tags":["grpc","protobuf","reflection","internal"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}