# INVALID_ARGUMENT: unknown field 42 in message type google.protobuf.Timestamp

- **ID:** `grpc/protobuf-unknown-field-rejected`
- **Domain:** grpc
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

gRPC server with protobuf strict validation (e.g., 'protojson.DiscardUnknown=false' or gRPC-Web) rejects a request containing an unknown field number in a protobuf message.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| protobuf v25.0 | active | — | — |
| gRPC v1.64.0 | active | — | — |
| gRPC-Web v1.5.0 | active | — | — |

## Workarounds

1. **Update the client to remove the unknown field: in protobuf JSON, omit field 42 from the request payload; for gRPC-Web, ensure the protobuf binary doesn't include extra fields by regenerating stubs from the same .proto file.** (90% success)
   ```
   Update the client to remove the unknown field: in protobuf JSON, omit field 42 from the request payload; for gRPC-Web, ensure the protobuf binary doesn't include extra fields by regenerating stubs from the same .proto file.
   ```
2. **Update the server to accept the unknown field: add field 42 to the protobuf definition and regenerate server code; deploy the updated server binary to match the client schema.** (85% success)
   ```
   Update the server to accept the unknown field: add field 42 to the protobuf definition and regenerate server code; deploy the updated server binary to match the client schema.
   ```
3. **Use a custom protobuf parser with 'protojson.UnmarshalOptions{DiscardUnknown: true}' in Go or equivalent in other languages to ignore unknown fields on the server side, but document the risk.** (75% success)
   ```
   Use a custom protobuf parser with 'protojson.UnmarshalOptions{DiscardUnknown: true}' in Go or equivalent in other languages to ignore unknown fields on the server side, but document the risk.
   ```

## Dead Ends

- **** — Adding a new field to the protobuf definition without updating the server binary fails because the server still lacks the field descriptor. (90% fail)
- **** — Ignoring the error and retrying the same request repeatedly doesn't change the server's validation; the error persists until the unknown field is removed. (99% fail)
- **** — Disabling server-side validation entirely ('protojson.DiscardUnknown=true') may expose the server to malicious payloads or data corruption from future schema changes. (60% fail)
