{"record":{"id":"091a70553124318b","repo":"apache/beam","slug":"unexpected-urn-v-for-window-coder","errorCode":null,"errorMessage":"unexpected URN %v for window coder","messagePattern":"unexpected URN (.+?) for window coder","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/graphx/coder.go","lineNumber":185,"sourceCode":"\t\treturn nil, errors.Errorf(\"could not unmarshal window coder: %w\", err)\n\t}\n\n\tw, err := urnToWindowCoder(c.GetSpec().GetUrn())\n\tif err != nil {\n\t\treturn nil, errors.SetTopLevelMsgf(err, \"failed to unmarshal window coder %v\", id)\n\t}\n\tb.windowCoders[id] = w\n\treturn w, nil\n}\n\nfunc urnToWindowCoder(urn string) (*coder.WindowCoder, error) {\n\tswitch urn {\n\tcase urnGlobalWindow:\n\t\treturn coder.NewGlobalWindow(), nil\n\tcase urnIntervalWindow:\n\t\treturn coder.NewIntervalWindow(), nil\n\tdefault:\n\t\terr := errors.Errorf(\"unexpected URN %v for window coder\", urn)\n\t\treturn nil, errors.WithContext(err, \"translate URN to window coder\")\n\t}\n}\n\nfunc (b *CoderUnmarshaller) makeCoder(id string, c *pipepb.Coder) (*coder.Coder, error) {\n\turn := c.GetSpec().GetUrn()\n\tcomponents := c.GetComponentCoderIds()\n\n\tswitch urn {\n\tcase urnBytesCoder:\n\t\treturn coder.NewBytes(), nil\n\n\tcase urnBoolCoder:\n\t\treturn coder.NewBool(), nil\n\n\tcase urnVarIntCoder:\n\t\treturn coder.NewVarInt(), nil\n","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/graphx/coder.go#L167-L203","documentation":"urnToWindowCoder maps a window coder's URN to a concrete window coder, supporting only urnGlobalWindow (beam:window:global_windows) and urnIntervalWindow (beam:window:interval_windows). Any other URN produces this error with context 'translate URN to window coder'.","triggerScenarios":"Unmarshaling a pipeline whose PCollection declares a window coder with an unrecognized URN — e.g. custom window URNs, session/test windows, or URNs from a newer SDK the local version doesn't know.","commonSituations":"Running a pipeline built with custom windowing against a runner/SDK that lacks that window coder support; version skew where the newer SDK emits a URN the older stager doesn't recognize; hand-written pipeline protos with typo'd URNs.","solutions":["Use only GlobalWindows or Fixed/Interval Windows, or upgrade the Beam Go SDK to a version supporting the URN.","Check for SDK version skew between pipeline submission and the runner; align versions.","If custom windows are required, verify the SDK/runner actually supports that window URN before using it.","Validate hand-written proto URNs against the constants in graphx (urnGlobalWindow, urnIntervalWindow)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"urn := wc.GetSpec().GetUrn()\nif urn != \"beam:window:global_windows:v1\" && urn != \"beam:window:interval_windows:v1\" {\n    return fmt.Errorf(\"unsupported window coder URN %q\", urn)\n}","typeGuard":null,"tryCatchPattern":"w, err := um.WindowCoder(id)\nif err != nil && strings.Contains(err.Error(), \"unexpected URN\") {\n    log.Printf(\"upgrade SDK or use global/interval windows: %v\", err)\n}","preventionTips":["Stick to GlobalWindows or Fixed/Interval Windows unless the runner supports custom URNs.","Check SDK release notes for new window coder URNs before upgrading producers.","Align SDK versions across submission, stager, and runner."],"tags":["go","windowing","urn","unsupported"],"backgroundTag":"unsupported-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}