{"record":{"id":"f7f6c57d4925079e","repo":"hyperledger/fabric","slug":"missing-envelope","errorCode":null,"errorMessage":"Missing envelope","messagePattern":"Missing envelope","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gossip/protoext/signing.go","lineNumber":130,"sourceCode":"\tsig, err := signer(payload)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\te := &gossip.Envelope{\n\t\tPayload:        payload,\n\t\tSignature:      sig,\n\t\tSecretEnvelope: secretEnvelope,\n\t}\n\tm.Envelope = e\n\treturn e, nil\n}\n\n// Verify verifies a signed GossipMessage with a given Verifier.\n// Returns nil on success, error on failure.\nfunc (m *SignedGossipMessage) Verify(peerIdentity []byte, verify Verifier) error {\n\tif m.Envelope == nil {\n\t\treturn errors.New(\"Missing envelope\")\n\t}\n\tif len(m.Envelope.Payload) == 0 {\n\t\treturn errors.New(\"Empty payload\")\n\t}\n\tif len(m.Envelope.Signature) == 0 {\n\t\treturn errors.New(\"Empty signature\")\n\t}\n\tpayloadSigVerificationErr := verify(peerIdentity, m.Envelope.Signature, m.Envelope.Payload)\n\tif payloadSigVerificationErr != nil {\n\t\treturn payloadSigVerificationErr\n\t}\n\tif m.Envelope.SecretEnvelope != nil {\n\t\tpayload := m.Envelope.SecretEnvelope.Payload\n\t\tsig := m.Envelope.SecretEnvelope.Signature\n\t\tif len(payload) == 0 {\n\t\t\treturn errors.New(\"Empty payload\")\n\t\t}\n\t\tif len(sig) == 0 {","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/gossip/protoext/signing.go#L112-L148","documentation":"Guard in SignedGossipMessage.Verify: the message's Envelope field is nil, so there is no payload/signature pair to verify. This means the SignedGossipMessage was constructed without an envelope (e.g. via NoopSign path or manual construction) rather than received from the wire.","triggerScenarios":"Thrown at gossip/protoext/signing.go:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Before calling Verify, ensure the SignedGossipMessage has an envelope — either obtain it via EnvelopeToGossipMessage from a received gossip.Envelope or call Sign/NoopSign which attach one","Check m.Envelope != nil before verification and skip or return a friendly error for locally constructed messages","If the message was supposed to come from the network, investigate why the envelope was dropped during unmarshaling or handling"],"exampleFix":null,"handlingStrategy":"type-guard","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"}