{"record":{"id":"39bcf03fbb84f480","repo":"hyperledger/fabric","slug":"error-unmarshalling-channelheader","errorCode":null,"errorMessage":"error unmarshalling ChannelHeader","messagePattern":"error unmarshalling ChannelHeader","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"protoutil/unmarshalers.go","lineNumber":61,"sourceCode":"// UnmarshalPayload unmarshals bytes to a Payload\nfunc UnmarshalPayload(encoded []byte) (*common.Payload, error) {\n\tpayload := &common.Payload{}\n\terr := proto.Unmarshal(encoded, payload)\n\treturn payload, errors.Wrap(err, \"error unmarshalling Payload\")\n}\n\n// UnmarshalEnvelope unmarshals bytes to a Envelope\nfunc UnmarshalEnvelope(encoded []byte) (*common.Envelope, error) {\n\tenvelope := &common.Envelope{}\n\terr := proto.Unmarshal(encoded, envelope)\n\treturn envelope, errors.Wrap(err, \"error unmarshalling Envelope\")\n}\n\n// UnmarshalChannelHeader unmarshals bytes to a ChannelHeader\nfunc UnmarshalChannelHeader(bytes []byte) (*common.ChannelHeader, error) {\n\tchdr := &common.ChannelHeader{}\n\terr := proto.Unmarshal(bytes, chdr)\n\treturn chdr, errors.Wrap(err, \"error unmarshalling ChannelHeader\")\n}\n\n// UnmarshalChaincodeID unmarshals bytes to a ChaincodeID\nfunc UnmarshalChaincodeID(bytes []byte) (*peer.ChaincodeID, error) {\n\tccid := &peer.ChaincodeID{}\n\terr := proto.Unmarshal(bytes, ccid)\n\treturn ccid, errors.Wrap(err, \"error unmarshalling ChaincodeID\")\n}\n\n// UnmarshalSignatureHeader unmarshals bytes to a SignatureHeader\nfunc UnmarshalSignatureHeader(bytes []byte) (*common.SignatureHeader, error) {\n\tsh := &common.SignatureHeader{}\n\terr := proto.Unmarshal(bytes, sh)\n\treturn sh, errors.Wrap(err, \"error unmarshalling SignatureHeader\")\n}\n\n// UnmarshalIdentifierHeader unmarshals bytes to an IdentifierHeader\nfunc UnmarshalIdentifierHeader(bytes []byte) (*common.IdentifierHeader, error) {","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/protoutil/unmarshalers.go#L43-L79","documentation":"Generic sentinel wrap in protoutil.UnmarshalChannelHeader: proto.Unmarshal failed to decode the input bytes into a common.ChannelHeader. It fires when callers (config bundle loading, envelope parsing, block verification, config updates) feed bytes that are not actually a serialized ChannelHeader — truncated, wrong-type, or corrupt payload data.","triggerScenarios":"Thrown at protoutil/unmarshalers.go:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reject the message with the malformed channel header","Check for client SDK version incompatibilities"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}