{"record":{"id":"50fb455e41ae00ca","repo":"risingwavelabs/risingwave","slug":"failed-to-decode-prost-field-not-found-50fb45","errorCode":null,"errorMessage":"Failed to decode prost: field not found `{}`","messagePattern":"Failed to decode prost: field not found `(.+?)`","errorType":"validation","errorClass":"StreamExecutorError","httpStatus":null,"severity":"error","filePath":"src/stream/src/executor/error.rs","lineNumber":144,"sourceCode":"        Self::serde_error(m)\n    }\n}\nimpl From<ValueEncodingError> for StreamExecutorError {\n    fn from(e: ValueEncodingError) -> Self {\n        Self::serde_error(e)\n    }\n}\n\n/// Connector error.\nimpl From<ConnectorError> for StreamExecutorError {\n    fn from(s: ConnectorError) -> Self {\n        Self::connector_error(s)\n    }\n}\n\nimpl From<PbFieldNotFound> for StreamExecutorError {\n    fn from(err: PbFieldNotFound) -> Self {\n        Self::from(anyhow::anyhow!(\n            \"Failed to decode prost: field not found `{}`\",\n            err.0\n        ))\n    }\n}\n\nimpl From<String> for StreamExecutorError {\n    fn from(s: String) -> Self {\n        ErrorKind::Uncategorized(anyhow::anyhow!(s)).into()\n    }\n}\n\nimpl From<(SinkError, SinkId)> for StreamExecutorError {\n    fn from((err, sink_id): (SinkError, SinkId)) -> Self {\n        ErrorKind::SinkError(err, sink_id).into()\n    }\n}\n","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/executor/error.rs#L126-L162","documentation":"This is the message produced when a PbFieldNotFound (a missing required protobuf field returned by generated prost decoders) is converted into StreamExecutorError. The From impl at src/stream/src/executor/error.rs:142 wraps it into an anyhow Uncategorized error with the text 'Failed to decode prost: field not found `{}`', where {} is the missing field's name.","triggerScenarios":"Raised in `From<PbFieldNotFound>::from` when a prost-decoded protobuf message (e.g. a StreamChunk, barrier, or actor message arriving over the exchange) lacks a field the Rust type marks as required (prost's `#[prost(..., required)]` / oneof decoding).","commonSituations":"Proto schema drift between nodes (one node compiled with a newer .proto than another); corrupted or truncated message payloads; incompatibility between meta/compute/frontend versions in a mixed cluster.","solutions":["Verify all nodes in the cluster run the same RisingWave version/proto definitions.","Identify the missing field name from the message and check which proto message is being decoded.","Regenerate/check the prost bindings if the schema was changed locally.","If the payload is user-provided or external, validate it before decoding."],"exampleFix":"// before (mixed cluster: compute node older than meta)\n# risingwavecompute --version 1.x-old  ; meta sends new proto fields\n// after\n# upgrade compute nodes to the same version as meta so prost schemas match","handlingStrategy":"validation","validationCode":"// check node versions match before mixed-cluster decoding\nfn ensure_version_compatible(local: &str, peer: &str) -> Result<(), String> {\n    if local != peer {\n        return Err(format!(\"proto schema mismatch: local={local} peer={peer}\"));\n    }\n    Ok(())\n}","typeGuard":"fn is_prost_field_not_found(e: &StreamExecutorError) -> bool {\n    e.to_string().starts_with(\"Failed to decode prost: field not found\")\n}","tryCatchPattern":"if let Err(e) = decode_result {\n    if e.to_string().contains(\"Failed to decode prost: field not found\") {\n        tracing::error!(error = %e, \"protobuf schema mismatch between nodes\");\n        return Err(e);\n    }\n    return Err(e);\n}","preventionTips":["Run identical RisingWave versions across all nodes (no rolling upgrades without compat guarantees).","Regenerate prost code whenever .proto files change and rebuild everything together.","Avoid manually crafting protobuf payloads; use generated types.","Add integration tests that exchange all message types between builds."],"tags":["prost","protobuf","decoding","stream-executor"],"backgroundTag":"protobuf-unmarshal-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}