# Grpc.Core.RpcException: Status(StatusCode="Unimplemented", Detail="Method service.MethodName is unimplemented.")

- **ID:** `dotnet/grpc-unsupported-protocol`
- **Domain:** dotnet
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The gRPC client is calling a method that the server does not have a handler for, often due to mismatched service definitions, missing method implementation, or incorrect proto file compilation.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC C# 2.46.0 | active | — | — |
| Grpc.AspNetCore 2.57.0 | active | — | — |
| Google.Protobuf 3.24.0 | active | — | — |
| .NET 6.0 | active | — | — |
| .NET 7.0 | active | — | — |
| .NET 8.0 | active | — | — |

## Workarounds

1. **Regenerate both client and server stubs from the same .proto file. Example command: protoc --csharp_out=./Client --grpc_out=./Client --plugin=protoc-gen-grpc=grpc_csharp_plugin service.proto** (90% success)
   ```
   Regenerate both client and server stubs from the same .proto file. Example command: protoc --csharp_out=./Client --grpc_out=./Client --plugin=protoc-gen-grpc=grpc_csharp_plugin service.proto
   ```
2. **Verify the server implements all methods defined in the proto file by checking the generated service base class. Ensure no method is missing or commented out.** (85% success)
   ```
   Verify the server implements all methods defined in the proto file by checking the generated service base class. Ensure no method is missing or commented out.
   ```
3. **Ensure the client is using the correct service address and port. Test with grpcurl: grpcurl -plaintext localhost:50051 list** (75% success)
   ```
   Ensure the client is using the correct service address and port. Test with grpcurl: grpcurl -plaintext localhost:50051 list
   ```

## Dead Ends

- **Restarting the server without updating the proto files or regenerating the client stub.** — The issue is a mismatch between client and server definitions; restarting alone does not synchronize them. (95% fail)
- **Adding a catch-all method in the server that returns an empty response.** — gRPC relies on strict method contracts; a catch-all violates the protocol and may cause other errors. (90% fail)
- **Changing the client to use a different HTTP version (e.g., HTTP/1.1).** — gRPC requires HTTP/2; HTTP/1.1 is not supported and will cause a different error. (100% fail)
