{"record":{"id":"7c41ea111ff10d40","repo":"risingwavelabs/risingwave","slug":"ser-de-proto-message-error-0","errorCode":null,"errorMessage":"ser/de proto message error: {0}","messagePattern":"ser/de proto message error: (.+?)","errorType":"exception","errorClass":"SecretError","httpStatus":null,"severity":"error","filePath":"src/common/secret/src/error.rs","lineNumber":40,"sourceCode":"\n#[derive(Error, Debug, Construct)]\npub enum SecretError {\n    #[error(\"secret not found: {0}\")]\n    ItemNotFound(SecretId),\n\n    #[error(\"decode utf8 error: {0}\")]\n    DecodeUtf8Error(#[from] std::string::FromUtf8Error),\n\n    #[error(\"I/O error: {0}\")]\n    IoError(#[from] std::io::Error),\n\n    #[error(\"unspecified secret ref type: {0}\")]\n    UnspecifiedRefType(SecretId),\n\n    #[error(\"failed to encrypt or decrypt the secret\")]\n    AesError,\n\n    #[error(\"ser/de proto message error: {0}\")]\n    ProtoError(#[from] bincode::Error),\n\n    #[error(transparent)]\n    Internal(#[from] anyhow::Error),\n}\n","sourceCodeStart":22,"sourceCodeEnd":46,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/secret/src/error.rs#L22-L46","documentation":"SecretError::ProtoError wraps bincode::Error (via #[from]) and is raised when serializing or deserializing a proto message with bincode fails in the secret handling path — e.g. converting secret payloads to/from bytes for storage or transport.","triggerScenarios":"Deserializing stored secret bytes that do not match the current bincode-encoded proto layout; serializing a proto message that bincode cannot encode; corrupted or hand-edited secret payloads in the backing store.","commonSituations":"RisingWave/proto schema version mismatch between writer and reader of stored secrets; truncated or corrupted secret records after a crash or bad migration; manually editing persisted meta state.","solutions":["Ensure all components run the same RisingWave/proto version so the bincode layout matches.","Delete and re-create the corrupted secret entries.","Restore from a consistent backup taken with the same schema version.","Check the inner bincode::Error message for the exact offset/field that failed."],"exampleFix":"// before\n// reading secrets stored by an older RW version into a newer binary\nrisingwave (v2.5) --meta-store ... // ProtoError: bincode deserialization failed\n\n// after\n// run the migration/upgrade path with matching versions\nrisingwave (v2.5) --meta-store ... --upgrade-from v2.4","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match manager.get(id).await {\n    Ok(secret) => secret,\n    Err(SecretError::ProtoError(e)) => {\n        // bincode layout mismatch or corrupted payload; non-retryable.\n        return Err(anyhow!(\"secret {id} payload unreadable ({e}); re-create the secret\"));\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Keep all RisingWave components on the same version so bincode-encoded payloads match.","Never hand-edit persisted meta state containing secret payloads.","Verify secret records after schema upgrades or meta store migrations.","Back up the meta store before upgrades so corrupted secrets can be rolled back."],"tags":["secret","bincode","serialization","proto"],"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"}