# grpc::UNIMPLEMENTED: 未找到方法: /service/MethodName

- **ID:** `communication/grpc-unimplemented-method`
- **领域:** communication
- **类别:** protocol_error
- **错误码:** `12`
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

gRPC客户端调用了服务器在其服务定义中未注册的方法，通常因proto文件不匹配或服务器二进制文件在proto更改后未重新构建。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| gRPC 1.62 | active | — | — |
| protobuf 3.25 | active | — | — |
| Go 1.22 | active | — | — |
| C++ gRPC 1.60 | active | — | — |

## 解决方案

1. ```
   Regenerate both client and server stubs from the same .proto file, then rebuild and redeploy the server. Verify the server logs show the registered service at startup.
   ```
2. ```
   Use gRPC reflection to list available methods on the server and compare with the client call. If the method is missing, the proto file on the server side is outdated.
   ```

## 无效尝试

- **Restart the gRPC server without recompiling** — The server binary still contains the old service definition; a restart does not add the missing method (95% 失败率)
- **Change the client to use a different method name with the same payload** — The method name must match the server's registered service exactly; arbitrary renaming causes a different UNIMPLEMENTED error (90% 失败率)
- **Increase the gRPC timeout on the client** — Timeout does not affect method availability; the error is immediate at the server's method lookup stage (100% 失败率)
