# rpc error: code = Unavailable desc = last resolver error: produced zero addresses

- **ID:** `go/grpc-failed-precondition-balancer`
- **Domain:** go
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The name resolver (DNS or custom) returned an empty address list, often due to a headless service with no ready endpoints, or a malformed target URI.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.x | active | — | — |

## Workarounds

1. **** (85% success)
   ```
   _, addrs, err := net.DefaultResolver.LookupHost(context.Background(), "myservice.ns.svc.cluster.local")
log.Printf("addrs=%v err=%v", addrs, err)
   ```
2. **** (75% success)
   ```
   conn, err := grpc.NewClient("static:///svc", grpc.WithResolvers(customResolver), grpc.WithTransportCredentials(insecure.NewCredentials()))
   ```

## Dead Ends

- **** — Bypasses resolution but then dials the literal string as an address, which may not be a valid host:port. (60% fail)
- **** — No addresses means every dial fails; retries never produce an address. (90% fail)
