{
  "id": "dotnet/grpc-unsupported-protocol",
  "signature": "Grpc.Core.RpcException: Status(StatusCode=\"Unimplemented\", Detail=\"Method service.MethodName is unimplemented.\")",
  "signature_zh": "Grpc.Core.RpcException: Status(StatusCode=\"Unimplemented\", Detail=\"方法 service.MethodName 未实现。\")",
  "regex": "Grpc\\.Core\\.RpcException: Status\\(StatusCode=\"Unimplemented\", Detail=\"Method .+ is unimplemented\\.\"\\)",
  "domain": "dotnet",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "The gRPC client is calling a method that the server does not have a handler for, often due to mismatched service definitions, missing method implementation, or incorrect proto file compilation.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 客户端调用了服务器没有处理程序的方法，通常是由于服务定义不匹配、缺少方法实现或 proto 文件编译错误导致的。",
  "versions": [
    {
      "version": "gRPC C# 2.46.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Grpc.AspNetCore 2.57.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Google.Protobuf 3.24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": ".NET 6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": ".NET 7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": ".NET 8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Restarting the server without updating the proto files or regenerating the client stub.",
      "why_fails": "The issue is a mismatch between client and server definitions; restarting alone does not synchronize them.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Adding a catch-all method in the server that returns an empty response.",
      "why_fails": "gRPC relies on strict method contracts; a catch-all violates the protocol and may cause other errors.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Changing the client to use a different HTTP version (e.g., HTTP/1.1).",
      "why_fails": "gRPC requires HTTP/2; HTTP/1.1 is not supported and will cause a different error.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Regenerate both client and server stubs from the same .proto file. Example command: protoc --csharp_out=./Client --grpc_out=./Client --plugin=protoc-gen-grpc=grpc_csharp_plugin service.proto",
      "success_rate": 0.9,
      "how": "Regenerate both client and server stubs from the same .proto file. Example command: protoc --csharp_out=./Client --grpc_out=./Client --plugin=protoc-gen-grpc=grpc_csharp_plugin service.proto",
      "condition": "",
      "sources": []
    },
    {
      "action": "Verify the server implements all methods defined in the proto file by checking the generated service base class. Ensure no method is missing or commented out.",
      "success_rate": 0.85,
      "how": "Verify the server implements all methods defined in the proto file by checking the generated service base class. Ensure no method is missing or commented out.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure the client is using the correct service address and port. Test with grpcurl: grpcurl -plaintext localhost:50051 list",
      "success_rate": 0.75,
      "how": "Ensure the client is using the correct service address and port. Test with grpcurl: grpcurl -plaintext localhost:50051 list",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Regenerate both client and server stubs from the same .proto file. Example command: protoc --csharp_out=./Client --grpc_out=./Client --plugin=protoc-gen-grpc=grpc_csharp_plugin service.proto",
    "Verify the server implements all methods defined in the proto file by checking the generated service base class. Ensure no method is missing or commented out.",
    "Ensure the client is using the correct service address and port. Test with grpcurl: grpcurl -plaintext localhost:50051 list"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://learn.microsoft.com/en-us/aspnet/core/grpc/troubleshoot?view=aspnetcore-8.0",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}