apache/beam · error
makeWindowCoders, unknown urn
Error message
makeWindowCoders, unknown urn: %v
What it means
prism's makeWindowCoders maps the pipeline's window coder URN to an engine window coder. It supports fixed, global, and interval windows; any other URN (e.g. custom windowing) hits the default case, logs an error, and panics because custom window functions are not yet supported by the runner.
Solutions
- Use a supported built-in windowing (Fixed, Sliding, Global, Sessions where mapped) instead of a custom WindowFn
- Check the logged urn in the error to identify which window coder is unsupported
- Rewrite the pipeline to avoid custom windowing when targeting prism
- Implement/extend support in prism's coders.go if you control the runner build (see TODO for issue 31921)
Example fix
// before pcf := beam.WindowInto(s, window.NewCustomWindowFn(myFn), col) // after pcf := beam.WindowInto(s, window.NewFixedWindows(time.Minute), col)
Defensive patterns
Strategy: validation
Validate before calling
if !isBuiltInWindowFn(pipeline) {
return errors.New("prism does not support custom window fns; use Fixed/Sliding/Global windows")
} Try / catch
defer func() {
if r := recover(); r != nil && strings.Contains(fmt.Sprint(r), "makeWindowCoders, unknown urn") {
err = errors.New("pipeline uses unsupported windowing for prism")
}
}() Prevention
- Use built-in windowing transforms when targeting prism
- Avoid custom WindowFn implementations with prism
- Read the urn in the panic/log output to identify the unsupported coder
- Track Beam issue 31921 for custom window function support
When it happens
Trigger: Submitting a pipeline to the prism runner whose GBK/window value coder uses a windowing URN other than the built-in ones, e.g. beam:coder:window:v1 payload specifying a custom WindowFn.
Common situations: Using custom WindowFn implementations (user code) with prism, or pipeline graphs produced by other SDKs with non-standard window coders.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- buildDescriptor: failed to handle coder on stage
- buildDescriptor: failed to handle coder on stage
- error decoding append bag user state window key
- Iterable coder must have only one component
- Nullable coder must have only one component
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/eb5f8a49abf42847.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/go/pkg/beam/runners/prism/internal/coders.go:126
return wvcID, nil
}
// makeWindowCoders categorizes and provides the encoder, decoder pair for the type of window.
func makeWindowCoders(wc *pipepb.Coder) (engine.WinCoderType, exec.WindowDecoder, exec.WindowEncoder) {
var cwc *coder.WindowCoder
var winCoder engine.WinCoderType
switch wc.GetSpec().GetUrn() {
case urns.CoderGlobalWindow:
winCoder = engine.WinGlobal
cwc = coder.NewGlobalWindow()
case urns.CoderIntervalWindow:
winCoder = engine.WinInterval
cwc = coder.NewIntervalWindow()
default:
// TODO(https://github.com/apache/beam/issues/31921): Support custom windowfns instead of panicking here.
winCoder = engine.WinCustom
slog.LogAttrs(context.TODO(), slog.LevelError, "makeWindowCoders: unknown urn", slog.String("urn", wc.GetSpec().GetUrn()))
panic(fmt.Sprintf("makeWindowCoders, unknown urn: %v", prototext.Format(wc)))
}
return winCoder, exec.MakeWindowDecoder(cwc), exec.MakeWindowEncoder(cwc)
}
// lpUnknownCoders takes a coder, and populates coders with any new coders
// coders that the runner needs to be safe, and speedy.
// It returns either the passed in coder id, or the new safe coder id.
func lpUnknownCoders(cID string, bundle, base map[string]*pipepb.Coder) (string, error) {
// First check if we've already added the LP version of this coder to coders already.
lpcID := cID + "_lp"
// Check if we've done this one before.
if _, ok := bundle[lpcID]; ok {
return lpcID, nil
}
// All coders in the coders map have been processed.
if _, ok := bundle[cID]; ok {
return cID, nil
}View on GitHub (pinned to 12126d8942)