{"record":{"id":"7f31ad7ea8dfe857","repo":"hyperledger/fabric","slug":"message-isn-t-a-stateinfo-message","errorCode":null,"errorMessage":"message isn't a stateInfo message","messagePattern":"message isn't a stateInfo message","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"discovery/client/client.go","lineNumber":592,"sourceCode":"func validateAliveMessage(message *gprotoext.SignedGossipMessage) error {\n\tam := message.GetAliveMsg()\n\tif am == nil {\n\t\treturn errors.New(\"message isn't an alive message\")\n\t}\n\tm := am.Membership\n\tif m == nil {\n\t\treturn errors.New(\"membership is empty\")\n\t}\n\tif am.Timestamp == nil {\n\t\treturn errors.New(\"timestamp is nil\")\n\t}\n\treturn nil\n}\n\nfunc validateStateInfoMessage(message *gprotoext.SignedGossipMessage) error {\n\tsi := message.GetStateInfo()\n\tif si == nil {\n\t\treturn errors.New(\"message isn't a stateInfo message\")\n\t}\n\tif si.Timestamp == nil {\n\t\treturn errors.New(\"timestamp is nil\")\n\t}\n\tif si.Properties == nil {\n\t\treturn errors.New(\"properties is nil\")\n\t}\n\treturn nil\n}\n\nfunc validateInterests(interests ...*peer.ChaincodeInterest) error {\n\tif len(interests) == 0 {\n\t\treturn errors.New(\"no chaincode interests given\")\n\t}\n\tfor _, interest := range interests {\n\t\tif interest == nil {\n\t\t\treturn errors.New(\"chaincode interest is nil\")\n\t\t}","sourceCodeStart":574,"sourceCodeEnd":610,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/discovery/client/client.go#L574-L610","documentation":"validateStateInfoMessage rejects a SignedGossipMessage whose GetStateInfo() is nil — the envelope payload is not a StateInfo message. In the discovery client peers must present valid StateInfo (channel membership declaration) for the endorser flow; this error is wrapped as 'failed validating stateInfo message'.","triggerScenarios":"A discovery response peer record contains a payload of a different gossip type (AliveMsg, DataMsg, empty) where a StateInfo is expected.","commonSituations":"Target peer not fully joined to the channel so it lacks state info; gossip store desync; Fabric version mismatch; corrupted envelope transport.","solutions":["Confirm the queried peer has joined the requested channel (peer channel list)","Restart gossip / the peer to regenerate StateInfo messages","Align Fabric versions across network components","Retry discovery against a different peer in the channel"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"func isStateInfo(m *gprotoext.SignedGossipMessage) bool { return m != nil && m.GetStateInfo() != nil }","typeGuard":"func isStateInfoMsg(m *gprotoext.SignedGossipMessage) bool { return m != nil && m.GetStateInfo() != nil }","tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"message isn't a stateInfo message\") {\n    logger.Warnf(\"peer %s did not return state info; is it joined to the channel?\", peerURL)\n    return err\n}","preventionTips":["Only query peers that have joined the target channel","Check 'peer channel list' before discovery","Keep Fabric versions consistent"],"tags":["hyperledger-fabric","gossip","stateinfo","discovery-service","validation"],"backgroundTag":"discovery-stateinfo-validation-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"}