hyperledger/fabric · error
GetChaincodeAction error %s
Error message
GetChaincodeAction error %s
What it means
Wrap of a protobuf unmarshal failure in extractValidationArtifacts (v2.0 validation logic): the ProposalResponsePayload extension bytes could not be decoded into a ChaincodeAction. It fires during transaction validation when a proposal response payload is malformed or was crafted with a non-ChaincodeAction extension, so response/validation artifacts cannot be extracted.
Source
Thrown at core/handlers/validation/builtin/v20/validation_logic.go:164
cap, err := protoutil.UnmarshalChaincodeActionPayload(tx.Actions[actionPosition].Payload)
if err != nil {
logger.Errorf("VSCC error: GetChaincodeActionPayload failed, err %s", err)
return nil, err
}
pRespPayload, err := protoutil.UnmarshalProposalResponsePayload(cap.Action.ProposalResponsePayload)
if err != nil {
err = fmt.Errorf("GetProposalResponsePayload error %s", err)
return nil, err
}
if pRespPayload.Extension == nil {
err = fmt.Errorf("nil pRespPayload.Extension")
return nil, err
}
respPayload, err := protoutil.UnmarshalChaincodeAction(pRespPayload.Extension)
if err != nil {
err = fmt.Errorf("GetChaincodeAction error %s", err)
return nil, err
}
return &validationArtifacts{
rwset: respPayload.Results,
prp: cap.Action.ProposalResponsePayload,
endorsements: cap.Action.Endorsements,
chdr: chdr,
env: env,
payl: payl,
cap: cap,
}, nil
}
// Validate validates the given envelope corresponding to a transaction with an endorsement
// policy as given in its serialized form.
// Note that in the case of dependencies in a block, such as tx_n modifying the endorsement policy
// for key a and tx_n+1 modifying the value of key a, Validate(tx_n+1) will block until Validate(tx_n)View on GitHub (pinned to 2736b63f8f)
Solutions
- Align fabric-protos versions between the transaction producer and the peer
- Rebuild/re-submit the transaction using a supported SDK so ChaincodeAction is marshaled correctly
- Check for block-store corruption; verify the block source (snapshot, orderer) is intact
- Treat as invalid transaction if it originates from a malicious client — validation code TX_MALFORMED
Example fix
// before
prp.Extension = protoutil.MarshalOrPanic(&peer.Response{}) // wrong message type
// after
prp.Extension = protoutil.MarshalOrPanic(&peer.ChaincodeAction{
Results: rwsetBytes,
Response: &peer.Response{Status: 200},
}) Defensive patterns
Strategy: validation
Validate before calling
ca := &peer.ChaincodeAction{}
if err := proto.Unmarshal(prp.Extension, ca); err != nil {
return fmt.Errorf("extension is not a valid ChaincodeAction")
} Type guard
func isValidChaincodeAction(b []byte) bool {
ca := &peer.ChaincodeAction{}
return proto.Unmarshal(b, ca) == nil && ca.Results != nil
} Try / catch
artifacts, err := extractValidationArtifacts(bytes, policy)
if err != nil {
if strings.Contains(err.Error(), "GetChaincodeAction error") {
return nil, validationerrors.TXMalformed
}
return nil, err
} Prevention
- Marshal Extension as &peer.ChaincodeAction only
- Align proto schema versions across the network
- Verify block-store integrity if corruption is suspected
- Reject malformed txs at endorsement/ingestion time
When it happens
Trigger: Extension bytes in a transaction's ProposalResponsePayload are corrupted, truncated, or were produced by a different proto message type / incompatible schema version.
Common situations: Proto schema drift between client SDK and peer; a buggy custom endorser marshaling the wrong message into Extension; corrupted block data on disk or in transit.
Understand the failure class
Background: "cannot parse invalid wire-format data", "cannot unmarshal", "failed unmarshalling": protobuf unmarshal errors explained — this error's family across 10 libraries.
Related errors
- GetProposalResponsePayload error %s
- error unmarshalling ChaincodeAction
- error unmarshalling ProposalResponsePayload
- error unmarshalling Transaction
- error unmarshalling
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/1ad59e3a20d8fd1c.
Report an issue: GitHub.