apache/beam · error
invalid WindowInto payload for %v
Error message
invalid WindowInto payload for %v
What it means
When translating a URNWindow (WindowInto) transform, the raw payload bytes must unmarshal into pipepb.WindowIntoPayload. Failure means the payload bytes are not a valid WindowIntoPayload protobuf, so the windowing strategy cannot be reconstructed and translation aborts.
Source
Thrown at sdks/go/pkg/beam/core/runtime/exec/translate.go:786
_, w, err := b.makeCoderForPCollection(pid)
if err != nil {
return nil, err
}
preservedCoderID := tp.GetReshuffle().GetCoderId()
pc, err := unmarshalReshuffleCoders(preservedCoderID, tp.GetReshuffle().GetCoderPayloads())
if err != nil {
return nil, err
}
u = &ReshuffleOutput{UID: b.idgen.New(), Coder: coder.NewW(pc, w), Out: out[0]}
default:
return nil, errors.Errorf("unexpected payload: %v", &tp)
}
case graphx.URNWindow:
var wp pipepb.WindowIntoPayload
if err := proto.Unmarshal(payload, &wp); err != nil {
return nil, errors.Wrapf(err, "invalid WindowInto payload for %v", transform)
}
wfn, err := unmarshalWindowFn(wp.GetWindowFn())
if err != nil {
return nil, err
}
u = &WindowInto{UID: b.idgen.New(), Fn: wfn, Out: out[0]}
case graphx.URNMapWindows:
var fn pipepb.FunctionSpec
if err := proto.Unmarshal(payload, &fn); err != nil {
return nil, errors.Wrapf(err, "invalid SideInput payload for %v", transform)
}
mapper, err := unmarshalAndMakeWindowMapping(&fn)
if err != nil {
return nil, err
}
u = &MapWindows{UID: b.idgen.New(), Fn: mapper, Out: out[0], FnUrn: fn.GetUrn()}
View on GitHub (pinned to 12126d8942)
Solutions
- Resubmit the pipeline from an unmodified Beam SDK so the WindowInto payload is serialized correctly
- Verify the payload bytes decode with `proto.Unmarshal(payload, &pipepb.WindowIntoPayload{})` offline
- Upgrade SDK versions on both builder and harness sides to ensure schema compatibility
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
var wp pipepb.WindowIntoPayload
if err := proto.Unmarshal(payload, &wp); err != nil {
return fmt.Errorf("payload is not a WindowIntoPayload: %w", err)
} Type guard
null
Try / catch
if _, err := graph.MakePipeline(pipelineProto); err != nil {
if strings.Contains(err.Error(), "invalid WindowInto payload") {
// rebuild and resubmit the pipeline from a stock SDK
}
} Prevention
- Resubmit pipelines from unmodified SDK code rather than editing job protos
- Keep runner and SDK proto schemas in version lockstep
- Validate job proto payloads in CI before submission
When it happens
Trigger: WindowInto payload bytes corrupted in the job proto, a payload generated by a foreign runner not using the Beam proto schema, or a misrouted payload (e.g. FunctionSpec bytes passed where WindowIntoPayload is expected).
Common situations: Custom runners crafting pipeline protos by hand; cross-language/cross-version pipelines; payloads altered by proxies or serialized job caches.
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
- invalid SideInput payload for %v
- empty type
- invalid scope
- invalid input pcollection
- unwindowed coder %v on DataSource %v: %v
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/08b08b820e463730.
Report an issue: GitHub.