grpc
protocol_error
ai_generated
true
未实现:不支持的压缩算法:deflate
UNIMPLEMENTED: grpc: Unsupported compression algorithm: deflate
ID: grpc/invalid-compression-algorithm
90%修复率
83%置信度
1证据数
2024-01-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| gRPC Python 1.47.0 | active | — | — | — |
| gRPC C++ 1.49.0 | active | — | — | — |
根因分析
客户端请求了服务器不支持的压缩算法。
English
The client requested a compression algorithm that the server does not support.
官方文档
https://grpc.io/docs/guides/compression/解决方案
-
Change the client to use gzip compression. Example: `channel = grpc.insecure_channel('target', options=[('grpc.default_compression_algorithm', grpc.Compression.Gzip)])` -
If using custom compression, register it on both sides via `grpc.Compression` API.
无效尝试
常见但无效的做法:
-
90% 失败
gRPC does not support deflate; it only supports gzip, identity, and optionally snappy or zstd.
-
70% 失败
The server will still reject it because the algorithm is not in its supported list.
-
95% 失败
gRPC does not negotiate compression; mismatch causes immediate failure.