{
  "id": "dotnet/grpc-unimplemented-service",
  "signature": "Grpc.Core.RpcException: Status(StatusCode=\"Unimplemented\", Detail=\"Method 'YourMethod' is unimplemented.\")",
  "signature_zh": "Grpc.Core.RpcException: Status(StatusCode=\"Unimplemented\", Detail=\"方法 'YourMethod' 未实现。\")",
  "regex": "Grpc\\.Core\\.RpcException: Status\\(StatusCode=\"Unimplemented\", Detail=\"Method '.*' is unimplemented\\.\"\\)",
  "domain": "dotnet",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "The gRPC client calls a method that the server has not registered or implemented, often due to missing service binding or incorrect proto compilation.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 客户端调用了服务器未注册或未实现的方法，通常是由于缺少服务绑定或 proto 编译错误。",
  "versions": [
    {
      "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": "Grpc.Tools 2.57.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Checking only the client-side proto file while the server uses an older version causes mismatch; both must be regenerated from the same .proto.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Restarting the server without recompiling the service code does not register new methods; the error persists.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Assuming the method name is case-insensitive in gRPC leads to wrong endpoint calls; gRPC method names are case-sensitive.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Regenerate both client and server stubs from the same .proto file using 'dotnet grpc' or 'protoc' tool. Ensure the server's startup code maps the service: 'app.UseEndpoints(endpoints => { endpoints.MapGrpcService<MyServiceImpl>(); });'",
      "success_rate": 0.9,
      "how": "Regenerate both client and server stubs from the same .proto file using 'dotnet grpc' or 'protoc' tool. Ensure the server's startup code maps the service: 'app.UseEndpoints(endpoints => { endpoints.MapGrpcService<MyServiceImpl>(); });'",
      "condition": "",
      "sources": []
    },
    {
      "action": "Verify the service is registered in the DI container: 'services.AddGrpc();' and 'services.AddScoped<MyServiceImpl>();' before mapping in endpoints.",
      "success_rate": 0.85,
      "how": "Verify the service is registered in the DI container: 'services.AddGrpc();' and 'services.AddScoped<MyServiceImpl>();' before mapping in endpoints.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 'dotnet grpc' 或 'protoc' 工具从同一 .proto 文件重新生成客户端和服务器存根。确保服务器启动代码映射服务：'app.UseEndpoints(endpoints => { endpoints.MapGrpcService<MyServiceImpl>(); });'",
    "验证服务已在 DI 容器中注册：'services.AddGrpc();' 和 'services.AddScoped<MyServiceImpl>();'，然后在端点中映射。"
  ],
  "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#unimplemented-method",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-08-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}