{
  "id": "grpc/unsupported-content-encoding",
  "signature": "UNIMPLEMENTED: grpc: unsupported content encoding \"gzip\"",
  "signature_zh": "UNIMPLEMENTED: grpc: 不支持的压缩编码 \"gzip\"",
  "regex": "UNIMPLEMENTED: grpc: unsupported content encoding",
  "domain": "grpc",
  "category": "encoding_error",
  "subcategory": null,
  "root_cause": "Server received a compressed request using an unsupported content encoding algorithm, typically because the server was not built with the corresponding compression library.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器收到使用了不支持的压缩编码算法的压缩请求，通常是因为服务器没有使用相应的压缩库构建。",
  "versions": [
    {
      "version": "gRPC v1.60.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.62.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.64.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Disabling compression on the client side entirely.",
      "why_fails": "Compression may be required for large payloads or mandated by network policies; disabling can cause performance degradation or rejection by other services.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "Setting the environment variable GRPC_DEFAULT_SSL_ROOTS_FILE_PATH to a custom cert path.",
      "why_fails": "This addresses TLS certificate issues, not content encoding errors; the compression algorithm is negotiated at the HTTP/2 layer.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Upgrading the gRPC client version without server-side changes.",
      "why_fails": "The server must also support the encoding; client-only changes do not affect server capabilities.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Enable the 'gzip' compression on the server by registering the gzip codec: `import grpc; server = grpc.server(futures.ThreadPoolExecutor(max_workers=10), compression=grpc.Compression.Gzip)`",
      "success_rate": 0.9,
      "how": "Enable the 'gzip' compression on the server by registering the gzip codec: `import grpc; server = grpc.server(futures.ThreadPoolExecutor(max_workers=10), compression=grpc.Compression.Gzip)`",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the server cannot be modified, configure the client to use 'identity' (no compression) for that specific call: `channel = grpc.insecure_channel(target, options=[('grpc.default_compression_algorithm', 0)])`",
      "success_rate": 0.8,
      "how": "If the server cannot be modified, configure the client to use 'identity' (no compression) for that specific call: `channel = grpc.insecure_channel(target, options=[('grpc.default_compression_algorithm', 0)])`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure the server binary is compiled with the optional compression library (e.g., zlib) by rebuilding with `-DgRPC_BUILD_CODEC=ON`.",
      "success_rate": 0.85,
      "how": "Ensure the server binary is compiled with the optional compression library (e.g., zlib) by rebuilding with `-DgRPC_BUILD_CODEC=ON`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Enable the 'gzip' compression on the server by registering the gzip codec: `import grpc; server = grpc.server(futures.ThreadPoolExecutor(max_workers=10), compression=grpc.Compression.Gzip)`",
    "If the server cannot be modified, configure the client to use 'identity' (no compression) for that specific call: `channel = grpc.insecure_channel(target, options=[('grpc.default_compression_algorithm', 0)])`",
    "Ensure the server binary is compiled with the optional compression library (e.g., zlib) by rebuilding with `-DgRPC_BUILD_CODEC=ON`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/compression/",
  "official_doc_section": null,
  "error_code": "ECONTENTENCODING",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}