{"record":{"id":"707b5d3cf6060483","repo":"hyperledger/fabric","slug":"cannot-read-qscc-response","errorCode":null,"errorMessage":"cannot read qscc response","messagePattern":"cannot read qscc response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/channel/getinfo.go","lineNumber":78,"sourceCode":"\tvar signedProp *pb.SignedProposal\n\tsignedProp, err = protoutil.GetSignedProposal(prop, cc.cf.Signer)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"cannot create signed proposal\")\n\t}\n\n\tproposalResp, err := cc.cf.EndorserClient.ProcessProposal(context.Background(), signedProp)\n\tif err != nil {\n\t\treturn nil, errors.WithMessage(err, \"failed sending proposal\")\n\t}\n\n\tif proposalResp.Response == nil || proposalResp.Response.Status != http.StatusOK {\n\t\treturn nil, errors.Errorf(\"received bad response, status %d: %s\", proposalResp.Response.Status, proposalResp.Response.Message)\n\t}\n\n\tblockChainInfo := &cb.BlockchainInfo{}\n\terr = proto.Unmarshal(proposalResp.Response.Payload, blockChainInfo)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"cannot read qscc response\")\n\t}\n\n\treturn blockChainInfo, nil\n}\n\nfunc getinfo(cmd *cobra.Command, cf *ChannelCmdFactory) error {\n\t// the global chainID filled by the \"-c\" command\n\tif channelID == common.UndefinedParamValue {\n\t\treturn errors.New(\"Must supply channel ID\")\n\t}\n\t// Parsing of the command line is done so silence cmd usage\n\tcmd.SilenceUsage = true\n\n\tvar err error\n\tif cf == nil {\n\t\tcf, err = InitCmdFactory(EndorserRequired, PeerDeliverNotRequired, OrdererNotRequired)\n\t\tif err != nil {\n\t\t\treturn err","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/channel/getinfo.go#L60-L96","documentation":"Returned by getBlockChainInfo when the payload of a successful (HTTP 200) qscc proposal response cannot be unmarshaled into a cb.BlockchainInfo protobuf. This indicates the peer returned 200 but the payload is not the expected serialized BlockchainInfo, so the CLI cannot decode the channel metadata.","triggerScenarios":"Calling `peer channel getinfo` against a peer that returns a malformed or non-standard qscc payload — typically a Fabric version mismatch between client binary and peer, a proxy/gateway intercepting the response, or a corrupted payload.","commonSituations":"Mixed Fabric v1.x/v2.x versions in the network; a custom qscc or chaincode replacement returning a different message type; an intermediary (envoy/proxy) rewriting response bodies.","solutions":["Check that the peer binary and fabric-cli/peer binary are the same Fabric version.","Bypass proxies/middlewares and query the peer directly to rule out payload corruption.","Inspect the raw response payload and peer logs for the actual message type returned.","Upgrade the peer or client so both speak the same protobuf schema."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"peer version  # compare with peer binary version in the network\nfabric-peer-container: peer version must match CLI major/minor","typeGuard":null,"tryCatchPattern":"// Retry once directly against the peer (no proxy); if it persists, treat as version/schema mismatch\nif ! peer channel getinfo -c \"$CHAN\"; then\n  peer channel getinfo -c \"$CHAN\" --tls --cafile \"$CA\"  # direct peer endpoint\nfi","preventionTips":["Pin the same Fabric version for CLI binaries and peers.","Avoid proxies/gateways that rewrite gRPC/protobuf response bodies.","Keep generated protobuf/stub versions in custom tooling in sync with Fabric release."],"tags":["hyperledger-fabric","protobuf","version-mismatch"],"backgroundTag":"protobuf-unmarshal-failed","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"}