# panic: grpc: Server.RegisterService found duplicate service registration for "pb.UserService"

- **ID:** `go/grpc-already-exists-duplicate-register`
- **Domain:** go
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The same gRPC service was registered twice on one grpc.Server, often from init() functions in multiple packages or from calling RegisterXServer twice during setup.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| google.golang.org/grpc 1.50+ | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   func RegisterAll(s *grpc.Server) {
    pb.RegisterUserServiceServer(s, &userServer{})
    pb.RegisterOrderServiceServer(s, &orderServer{})
}
// call exactly once from main
   ```
2. **** (90% success)
   ```
   // delete func init() { pb.RegisterUserServiceServer(...) }
// replace with explicit call in main()
   ```

## Dead Ends

- **** — The server is left in an inconsistent state; subsequent calls may hit the wrong handler or panic again. (85% fail)
- **** — Two servers on the same listener cause bind errors or split traffic unpredictably. (70% fail)
