microsoft/semantic-kernel · error · KernelException

Impossible to find protobuf type name corresponding to '{typ

Error message

Impossible to find protobuf type name corresponding to '{type}' type.

What it means

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.

Source

Thrown at dotnet/src/Functions/Functions.Grpc/Protobuf/ProtoDocumentParser.cs:135

    /// <summary>
    /// Returns protobuf data type name.
    /// </summary>
    /// <param name="type">Type descriptor.</param>
    /// <returns>The protobuf data type name.</returns>
    private static string GetProtobufDataTypeName(FieldDescriptorProto.Type type)
    {
        var fieldInfo = typeof(FieldDescriptorProto.Type).GetField(type.ToString());
        if (fieldInfo is not null)
        {
            //Get protobuf type name from enum attribute - [global::ProtoBuf.ProtoEnum(Name = @"TYPE_DOUBLE")]
            var attribute = (ProtoEnumAttribute?)Attribute.GetCustomAttribute(fieldInfo, typeof(ProtoEnumAttribute));
            if (attribute is not null)
            {
                return attribute.Name;
            }
        }

        throw new KernelException($"Impossible to find protobuf type name corresponding to '{type}' type.");
    }
}

View on GitHub (pinned to c028a0c7dc)

Solutions

  1. Pin or align the protobuf descriptor library version with the one this runner was built against.
  2. Avoid field types that surface unmapped enum members (see also error 595).
  3. If reproducible, report it — missing attributes on a shipping enum is a library/compat defect.
Defensive patterns

Strategy: try-catch

Try / catch

try { /* parse */ }
catch (KernelException ex) when (ex.Message.Contains("Impossible to find protobuf type name")) {
    // likely a descriptor-library version mismatch; align versions
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13). Data as JSON: /api/errors/79073338b387f304. Report an issue: GitHub.