# error: unknown field "new_field" in google.protobuf.Struct

- **ID:** `go/grpc-unknown-protobuf-field`
- **Domain:** go
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The client or server is sending a protobuf message with a field that was added in a newer version of the .proto file, but the receiving side is using an older compiled version that doesn't know about it.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.0 | active | — | — |
| 1.1 | active | — | — |

## Workarounds

1. **Regenerate the protobuf code with the latest .proto file** (95% success)
   ```
   protoc --go_out=. --go-grpc_out=. your.proto
   ```
2. **Enable protobuf unknown field preservation to avoid errors** (85% success)
   ```
   import "google.golang.org/protobuf/proto"
// Use proto.UnmarshalOptions{DiscardUnknown: true} when unmarshaling
   ```

## Dead Ends

- **Ignore the error and hope the message is processed successfully** — The error is returned by the protobuf unmarshaller, so the message is discarded entirely, and the RPC fails. (90% fail)
- **Manually parse the JSON representation instead of using protobuf** — This bypasses the type safety and can lead to data corruption or security issues, and still won't resolve the unknown field error. (70% fail)
