# rpc error: code = InvalidArgument desc = expected string, got number for field age

- **ID:** `go/grpc-invalid-argument-field-type`
- **Domain:** go
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The protobuf message field type mismatch; e.g., sending an integer where a string is expected.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.56.x | active | — | — |
| 1.57.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   string age = 1; protoc --go_out=. *.proto
   ```
2. **** (90% success)
   ```
   req := &pb.Person{Age: strconv.Itoa(30)}
   ```
3. **** (85% success)
   ```
   if _, ok := req.Age.(string); !ok { return status.Error(codes.InvalidArgument, "age must be string") }
   ```

## Dead Ends

- **Continuing to send incorrect type.** — Same error persists. (100% fail)
- **Using type assertion without changing proto.** — Proto definition determines wire format. (80% fail)
- **Blaming server for type checking.** — Client must follow proto definition. (50% fail)
