{"record":{"id":"df44831cfd84bd6c","repo":"hyperledger/fabric","slug":"malformed-transaction-contents-s","errorCode":null,"errorMessage":"malformed transaction contents: %s","messagePattern":"malformed transaction contents: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/configtxgen/main.go","lineNumber":113,"sourceCode":"\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 {\n\t\t\t\t\treturn errors.Wrapf(err, \"bad org definition for org %s\", org.Name)\n\t\t\t\t}\n\n\t\t\t\tif err := protolator.DeepMarshalJSON(os.Stdout, &ordererext.DynamicOrdererOrgGroup{ConfigGroup: og}); err != nil {\n\t\t\t\t\treturn errors.Wrapf(err, \"malformed org definition for org: %s\", org.Name)","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/cmd/configtxgen/main.go#L95-L131","documentation":"Returned by doInspectChannelCreateTx when protolator.DeepMarshalJSON fails to render the unmarshaled envelope as JSON on stdout. The envelope decoded as protobuf, but its nested contents are malformed enough that the deep JSON conversion aborted.","triggerScenarios":"Thrown at cmd/configtxgen/main.go:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the offending protobuf field","Regenerate the channel creation tx from a valid profile"],"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"}