hyperledger/fabric · error
Invalid signed proposal during channelless check policy with
Error message
Invalid signed proposal during channelless check policy with policy [%s]
What it means
After the policy name check, CheckPolicyNoChannel verifies a SignedProposal was actually supplied. Since signedProp is a *pb.SignedProposal pointer, passing nil means there is nothing to authenticate, so the function returns this error naming the requested policy.
Source
Thrown at core/policy/policy.go:113
sd := []*protoutil.SignedData{{
Data: signedProp.ProposalBytes,
Identity: shdr.Creator,
Signature: signedProp.Signature,
}}
return p.CheckPolicyBySignedData(channelID, policyName, sd)
}
// CheckPolicyNoChannel checks that the passed signed proposal is valid with the respect to
// passed policy on the local MSP.
func (p *policyChecker) CheckPolicyNoChannel(policyName string, signedProp *pb.SignedProposal) error {
if policyName == "" {
return errors.New("Invalid policy name during channelless check policy. Name must be different from nil.")
}
if signedProp == nil {
return fmt.Errorf("Invalid signed proposal during channelless check policy with policy [%s]", policyName)
}
proposal, err := protoutil.UnmarshalProposal(signedProp.ProposalBytes)
if err != nil {
return fmt.Errorf("Failing extracting proposal during channelless check policy with policy [%s]: [%s]", policyName, err)
}
header, err := protoutil.UnmarshalHeader(proposal.Header)
if err != nil {
return fmt.Errorf("Failing extracting header during channelless check policy with policy [%s]: [%s]", policyName, err)
}
shdr, err := protoutil.UnmarshalSignatureHeader(header.SignatureHeader)
if err != nil {
return fmt.Errorf("Invalid Proposal's SignatureHeader during channelless check policy with policy [%s]: [%s]", policyName, err)
}
// Deserialize proposal's creator with the local MSPView on GitHub (pinned to 2736b63f8f)
Solutions
- Ensure the caller constructs a valid SignedProposal (ProposalBytes + Signature) before the call
- Check the caller's unmarshal/decode path for ignored errors that yield a nil proposal
- Add a nil check in the calling code before invoking CheckPolicyNoChannel
Example fix
// before
var signedProp *pb.SignedProposal
err := pc.CheckPolicyNoChannel("Users", signedProp)
// after
if signedProp == nil || signedProp.ProposalBytes == nil {
return errors.New("signed proposal required")
}
err := pc.CheckPolicyNoChannel("Users", signedProp) Defensive patterns
Strategy: type-guard
Validate before calling
if signedProp == nil { return errors.New("signed proposal required") } Type guard
function isSignedProposal(sp) { return sp != null && sp.proposal_bytes != null && sp.signature != null; } Try / catch
err := checker.CheckPolicyNoChannel(policyName, signedProp)
if err != nil {
if strings.Contains(err.Error(), "Invalid signed proposal during channelless check policy") {
// nil proposal upstream: audit decode path
}
return err
} Prevention
- Always check decode/unmarshal errors before using proposal pointers
- Nil-guard at API entry points
- Require both ProposalBytes and Signature fields
- Favor explicit construction over zero-value structs
When it happens
Trigger: Calling CheckPolicyNoChannel with a nil *pb.SignedProposal, or a caller that propagated a nil proposal from an earlier failed decode.
Common situations: Unmarshaling a client request into SignedProposal that returned nil on error but the error was ignored; request handlers on the peer (channelless system chaincode calls) receiving malformed/missing proposal fields.
Related errors
- config envelope is nil
- Invalid policy name during check policy on channel [%s]. Nam
- Invalid policy name during channelless check policy. Name mu
- nil Raft config metadata
- nil arguments
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/fac98ce48973898d.
Report an issue: GitHub.