{
  "id": "go/grpc-failed-precondition-stream-closed",
  "signature": "rpc error: code = FailedPrecondition desc = stream terminated by RST_STREAM with error code: PROTOCOL_ERROR",
  "signature_zh": "rpc 错误：代码 = FailedPrecondition 描述 = 流被 RST_STREAM 终止，错误代码：PROTOCOL_ERROR",
  "regex": "rpc\\ error:\\ code\\ =\\ FailedPrecondition\\ desc\\ =\\ stream\\ terminated\\ by\\ RST_STREAM\\ with\\ error\\ code:\\ PROTOCOL_ERROR",
  "domain": "go",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The gRPC stream was reset by the server or client due to a protocol violation, such as sending data after the stream is closed or malformed framing.",
  "root_cause_type": "generic",
  "root_cause_zh": "由于协议违规，例如在流关闭后发送数据或格式错误的帧，gRPC 流被服务器或客户端重置。",
  "versions": [
    {
      "version": "1.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This error is not timeout-related; increasing timeout will not prevent RST_STREAM.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "gRPC requires HTTP/2; disabling it will break gRPC entirely.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Call CloseSend() only after all messages are sent, and handle the send error properly.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.7,
      "how": "Configure the proxy to support HTTP/2 and not buffer or modify stream frames.",
      "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.8,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}