{"record":{"id":"7fd8c78b3cd0d52e","repo":"hyperledger/fabric","slug":"error-unmarshalling-envelope-s","errorCode":null,"errorMessage":"Error unmarshalling envelope: %s","messagePattern":"Error unmarshalling envelope: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/configtxgen/main.go","lineNumber":108,"sourceCode":"\t}\n\terr = protolator.DeepMarshalJSON(os.Stdout, block)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"malformed block contents: %s\", err)\n\t}\n\treturn nil\n}\n\nfunc doInspectChannelCreateTx(inspectChannelCreateTx string) error {\n\tlogger.Info(\"Inspecting transaction\")\n\tdata, err := os.ReadFile(inspectChannelCreateTx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not read channel create tx: %s\", err)\n\t}\n\n\tlogger.Info(\"Parsing transaction\")\n\tenv, err := protoutil.UnmarshalEnvelope(data)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error unmarshalling envelope: %s\", err)\n\t}\n\n\terr = protolator.DeepMarshalJSON(os.Stdout, env)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"malformed transaction contents: %s\", err)\n\t}\n\n\treturn nil\n}\n\nfunc doPrintOrg(t *genesisconfig.TopLevel, printOrg string) error {\n\tfor _, org := range t.Organizations {\n\t\tif org.Name == printOrg {\n\t\t\tif len(org.OrdererEndpoints) > 0 {\n\t\t\t\t// An Orderer OrgGroup\n\t\t\t\tchannelCapabilities := t.Capabilities[\"Channel\"]\n\t\t\t\tog, err := encoder.NewOrdererOrgGroup(org, channelCapabilities)\n\t\t\t\tif err != nil {","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/cmd/configtxgen/main.go#L90-L126","documentation":"Returned by doInspectChannelCreateTx when protoutil.UnmarshalEnvelope fails on the file contents: the data is not a valid protobuf-encoded common.Envelope. The file was read successfully but is not a channel-creation transaction.","triggerScenarios":"Thrown at cmd/configtxgen/main.go:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the file is a binary channel-creation transaction, not a block or text","Re-create the tx with configtxgen -outputCreateChannelTx 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"}