{
  "id": "grpc/compression-negotiation-failed",
  "signature": "INTERNAL: grpc: compression algorithm negotiation failed",
  "signature_zh": "INTERNAL: grpc: 压缩算法协商失败",
  "regex": "INTERNAL: grpc: compression algorithm negotiation failed",
  "domain": "grpc",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "Client and server do not support a common compression algorithm; client sends a message with an unsupported algorithm or server rejects the proposed algorithm during handshake.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端和服务器不支持共同的压缩算法；客户端发送的消息使用了不支持的算法，或者服务器在握手期间拒绝了提议的算法。",
  "versions": [
    {
      "version": "gRPC C++ 1.45+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC Go 1.45+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC Python 1.45+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Enabling all compression algorithms on both sides",
      "why_fails": "May increase memory usage and latency; also some algorithms (e.g., deflate) are deprecated and may cause interoperability issues.",
      "fail_rate": 0.35,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling compression entirely",
      "why_fails": "Increases bandwidth usage; may not be acceptable for high-volume services.",
      "fail_rate": 0.25,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure both client and server use the same compression algorithm. Set client-side: grpc.WithDefaultCallOptions(grpc.UseCompressor(\"gzip\")) in Go. On server, register compressor: import \"google.golang.org/grpc/encoding/gzip\"",
      "success_rate": 0.9,
      "how": "Ensure both client and server use the same compression algorithm. Set client-side: grpc.WithDefaultCallOptions(grpc.UseCompressor(\"gzip\")) in Go. On server, register compressor: import \"google.golang.org/grpc/encoding/gzip\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "Upgrade gRPC libraries to latest versions to support modern compression algorithms like gzip or snappy. In Python: pip install grpcio==1.60.0 and set grpc.Compression.Gzip",
      "success_rate": 0.8,
      "how": "Upgrade gRPC libraries to latest versions to support modern compression algorithms like gzip or snappy. In Python: pip install grpcio==1.60.0 and set grpc.Compression.Gzip",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure both client and server use the same compression algorithm. Set client-side: grpc.WithDefaultCallOptions(grpc.UseCompressor(\"gzip\")) in Go. On server, register compressor: import \"google.golang.org/grpc/encoding/gzip\"",
    "Upgrade gRPC libraries to latest versions to support modern compression algorithms like gzip or snappy. In Python: pip install grpcio==1.60.0 and set grpc.Compression.Gzip"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/compression/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.75,
  "resolvable": "true",
  "first_seen": "2023-09-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}