hyperledger/fabric · error
failed parsing header
Error message
failed parsing header
What it means
Returned by validateTimewindowProposal when protoutil.UnmarshalHeader fails on the proposal's Header field. The proposal decoded but its header bytes are not a valid Header message, blocking the timestamp check the filter exists to perform.
Source
Thrown at core/handlers/auth/filter/timewindow.go:44
type timewindowCheckFilter struct {
next peer.EndorserServer
timeWindow time.Duration
}
// Init initializes the Filter with the next EndorserServer
func (f *timewindowCheckFilter) Init(next peer.EndorserServer) {
f.next = next
}
func validateTimewindowProposal(signedProp *peer.SignedProposal, timeWindow time.Duration) error {
prop, err := protoutil.UnmarshalProposal(signedProp.ProposalBytes)
if err != nil {
return errors.Wrap(err, "failed parsing proposal")
}
hdr, err := protoutil.UnmarshalHeader(prop.Header)
if err != nil {
return errors.Wrap(err, "failed parsing header")
}
chdr, err := protoutil.UnmarshalChannelHeader(hdr.ChannelHeader)
if err != nil {
return errors.Wrap(err, "failed parsing channel header")
}
timeProposal := chdr.Timestamp.AsTime().UTC()
now := time.Now().UTC()
if timeProposal.Add(timeWindow).Before(now) || timeProposal.Add(-timeWindow).After(now) {
return errors.Errorf("request unauthorized due to incorrect timestamp %s, peer time %s, peer.authentication.timewindow %s",
timeProposal.Format(time.RFC3339), now.Format(time.RFC3339), timeWindow.String())
}
return nil
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Fix proposal construction to include a valid Header
- Reject the malformed request
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/handlers/auth/filter/timewindow.go:44 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/d3b3024721042da6.
Report an issue: GitHub.