{
  "id": "grpc/compression-algorithm-not-supported",
  "signature": "UNIMPLEMENTED: grpc: Decompressor is not installed for grpc-encoding: snappy",
  "signature_zh": "UNIMPLEMENTED: gRPC: 未安装 grpc-encoding: snappy 的解压缩器",
  "regex": "Decompressor is not installed for grpc-encoding: (snappy|lz4|zstd)",
  "domain": "grpc",
  "category": "encoding_error",
  "subcategory": null,
  "root_cause": "The client sent a message compressed with 'snappy' algorithm, but the server does not have a decompressor registered for that encoding, so it cannot decode the message.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端使用 'snappy' 算法压缩了消息，但服务器未注册该编码的解压缩器，因此无法解码消息。",
  "versions": [
    {
      "version": "gRPC-go v1.65.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC-java v1.64.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "C-core v1.65.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Setting environment variable GRPC_GO_COMPRESSION=snappy on the server without importing the snappy package does not register the decompressor; the package must be imported explicitly.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling compression entirely on the client (grpc.default_compression_algorithm=identity) may break other clients that rely on compression for performance.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "On the server, import the snappy package explicitly. In Go: import _ \"google.golang.org/grpc/encoding/snappy\". Then rebuild the server binary.",
      "success_rate": 0.95,
      "how": "On the server, import the snappy package explicitly. In Go: import _ \"google.golang.org/grpc/encoding/snappy\". Then rebuild the server binary.",
      "condition": "",
      "sources": []
    },
    {
      "action": "On the client, change the compression algorithm to a supported one like gzip or identity: in Go dial option: grpc.WithDefaultCallOptions(grpc.UseCompressor(\"gzip\")).",
      "success_rate": 0.85,
      "how": "On the client, change the compression algorithm to a supported one like gzip or identity: in Go dial option: grpc.WithDefaultCallOptions(grpc.UseCompressor(\"gzip\")).",
      "condition": "",
      "sources": []
    },
    {
      "action": "For Java servers, add the dependency: <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-snappy</artifactId> <version>1.64.0</version> </dependency> and it auto-registers.",
      "success_rate": 0.9,
      "how": "For Java servers, add the dependency: <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-snappy</artifactId> <version>1.64.0</version> </dependency> and it auto-registers.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "On the server, import the snappy package explicitly. In Go: import _ \"google.golang.org/grpc/encoding/snappy\". Then rebuild the server binary.",
    "On the client, change the compression algorithm to a supported one like gzip or identity: in Go dial option: grpc.WithDefaultCallOptions(grpc.UseCompressor(\"gzip\")).",
    "For Java servers, add the dependency: <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-snappy</artifactId> <version>1.64.0</version> </dependency> and it auto-registers."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/languages/go/compression/",
  "official_doc_section": null,
  "error_code": "GRPC_UNSUPPORTED_COMPRESSION",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-05-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}