{
  "id": "go/grpc-status-code-mismatch",
  "signature": "rpc error: code = Unknown desc = unexpected EOF",
  "signature_zh": "rpc 错误：代码 = Unknown 描述 = 意外的 EOF",
  "regex": "rpc\\ error:\\ code\\ =\\ Unknown\\ desc\\ =\\ unexpected\\ EOF",
  "domain": "go",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The gRPC stream is abruptly closed, possibly due to a network issue or server crash, and the client receives an EOF without a proper status code.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 流被突然关闭，可能是由于网络问题或服务器崩溃，客户端收到 EOF 而没有正确的状态码。",
  "versions": [
    {
      "version": "1.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Retry the RPC immediately with the same connection",
      "why_fails": "The connection is likely broken, so retrying on the same connection will fail again.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Ignore the error and assume the response is empty",
      "why_fails": "The RPC did not complete successfully, so the response is invalid.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use a new connection for retries",
      "success_rate": 0.85,
      "how": "conn, _ := grpc.NewClient(\"localhost:50051\", grpc.WithTransportCredentials(insecure.NewCredentials()))\ndefer conn.Close()",
      "condition": "",
      "sources": []
    },
    {
      "action": "Enable keepalive and connection recovery",
      "success_rate": 0.75,
      "how": "grpc.WithKeepaliveParams(keepalive.ClientParameters{Time: 10 * time.Second, Timeout: 3 * time.Second, PermitWithoutStream: true})",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}