{"record":{"id":"539bb01f1bdac0c5","repo":"hyperledger/fabric","slug":"failed-to-unmarshal-payload-from-envelope","errorCode":null,"errorMessage":"failed to unmarshal payload from envelope","messagePattern":"failed to unmarshal payload from envelope","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/channelconfig/bundle.go","lineNumber":172,"sourceCode":"\t\t\t\tmspID := org.MSPID()\n\t\t\t\tif mspID != norg.MSPID() {\n\t\t\t\t\treturn errors.Errorf(\"consortium %s org %s attempted to change MSP ID from %s to %s\", consortiumName, orgName, mspID, norg.MSPID())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if _, okNew := nb.ConsortiumsConfig(); okNew {\n\t\treturn errors.Errorf(\"current config has no consortiums section, but new config does\")\n\t}\n\n\treturn nil\n}\n\n// NewBundleFromEnvelope wraps the NewBundle function, extracting the needed\n// information from a full configtx\nfunc NewBundleFromEnvelope(env *cb.Envelope, bccsp bccsp.BCCSP) (*Bundle, error) {\n\tpayload, err := protoutil.UnmarshalPayload(env.Payload)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to unmarshal payload from envelope\")\n\t}\n\n\tconfigEnvelope, err := configtx.UnmarshalConfigEnvelope(payload.Data)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to unmarshal config envelope from payload\")\n\t}\n\n\tif payload.Header == nil {\n\t\treturn nil, errors.Errorf(\"envelope header cannot be nil\")\n\t}\n\n\tchdr, err := protoutil.UnmarshalChannelHeader(payload.Header.ChannelHeader)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"failed to unmarshal channel header\")\n\t}\n\n\treturn NewBundle(chdr.ChannelId, configEnvelope.Config, bccsp)\n}","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/channelconfig/bundle.go#L154-L190","documentation":"Wrapped protoutil.UnmarshalPayload failure inside NewBundleFromEnvelope: the envelope's payload bytes are not a decodable common.Payload, so the config envelope cannot be extracted from a join/config block.","triggerScenarios":"Thrown at common/channelconfig/bundle.go:172 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the envelope came from a genuine Fabric config block","Rebuild the join/config block from a trusted peer and retry"],"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"}