{"record":{"id":"ff851d3ac6cc8746","repo":"apache/beam","slug":"unable-to-rewrite-coder-v-for-timer-v-for-transform-v-in","errorCode":null,"errorMessage":"unable to rewrite coder %v for timer %v for transform %v in stage %v: %w","messagePattern":"unable to rewrite coder (.+?) for timer (.+?) for transform (.+?) in stage (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/stage.go","lineNumber":529,"sourceCode":"\t\t\tcase *pipepb.StateSpec_ReadModifyWriteSpec:\n\t\t\t\trewriteCoder(&s.ReadModifyWriteSpec.CoderId)\n\t\t\t}\n\t\t\tif rewriteErr != nil {\n\t\t\t\treturn rewriteErr\n\t\t\t}\n\t\t}\n\t\tfor timerID, v := range pardo.GetTimerFamilySpecs() {\n\t\t\tstg.hasTimers = append(stg.hasTimers, engine.StaticTimerID{TransformID: tid, TimerFamily: timerID})\n\t\t\tif v.TimeDomain == pipepb.TimeDomain_PROCESSING_TIME {\n\t\t\t\tif stg.processingTimeTimers == nil {\n\t\t\t\t\tstg.processingTimeTimers = map[string]bool{}\n\t\t\t\t}\n\t\t\t\tstg.processingTimeTimers[timerID] = true\n\t\t\t}\n\t\t\trewrite = true\n\t\t\tnewCid, err := lpUnknownCoders(v.GetTimerFamilyCoderId(), coders, comps.GetCoders())\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"unable to rewrite coder %v for timer %v for transform %v in stage %v: %w\", v.GetTimerFamilyCoderId(), timerID, tid, stg.ID, err)\n\t\t\t}\n\t\t\tv.TimerFamilyCoderId = newCid\n\t\t}\n\t\tif rewrite {\n\t\t\tpyld, err := proto.MarshalOptions{}.Marshal(pardo)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"unable to encode ParDoPayload for %v in stage %v after rewrite\", tid, stg.ID)\n\t\t\t}\n\t\t\tt.Spec.Payload = pyld\n\t\t}\n\t}\n\tif len(transforms) == 0 {\n\t\treturn fmt.Errorf(\"buildDescriptor: invalid stage - no transforms at all %v\", stg.ID)\n\t}\n\n\t// Start with outputs, since they're simple and uniform.\n\tsink2Col := map[string]string{}\n\tcol2Coders := map[string]engine.PColInfo{}","sourceCodeStart":511,"sourceCodeEnd":547,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/stage.go#L511-L547","documentation":"Prism's buildDescriptor rewrites unknown coders on timer family declarations of a ParDo transform so the stage's bundle carries concrete coder bytes. When lpUnknownCoders fails to resolve or encode the timer family coder, this error wraps the underlying reason (unknown coder ID, missing component coder, unsupported URN) with the timer, transform and stage context. It means the pipeline's coder graph is incomplete or malformed for that timer.","triggerScenarios":"A ParDo transform in the stage declares a timer family whose TimerFamilyCoderId references a coder not present/known in components, or lpUnknownCoders fails while substituting a portable coder for an unknown one.","commonSituations":"SDK-generated pipelines with custom coders the runner hasn't seen; cross-language pipelines where a Python/Java SDK emits timer coders Go prism can't resolve; hand-crafted or truncated pipeline protobufs; Beam SDK/runner version mismatches introducing new coder URNs.","solutions":["Inspect the wrapped %w error to find which coder URN or component ID is unknown","Verify the transform's timer family coder exists in components.coders of the submitted pipeline","Regenerate the pipeline with a Beam SDK version compatible with the prism runner","Check cross-language expansion output for coders not registered in the Go runner"],"exampleFix":"// before: timer coder references unknown id\nv.TimerFamilyCoderId = \"coder_missing\"\n// after: ensure the coder is registered in pipeline components before submit\npcoli.CoderId = registerKnownCoder(p, MyTimerType{}) // id resolvable via lpUnknownCoders","handlingStrategy":"validation","validationCode":"// Before submitting, verify timer family coder is registered\nif _, ok := comps.GetCoders()[timerFamilyCoderID]; !ok {\n    return fmt.Errorf(\"timer family coder %q not registered\", timerFamilyCoderID)\n}","typeGuard":null,"tryCatchPattern":"if err := submitPipeline(ctx, p); err != nil {\n    var coderErr *CoderRewriteError\n    if errors.As(err, &coderErr) { log.Fatalf(\"coder rewrite failed: %v\", coderErr) }\n    return err\n}","preventionTips":["Register all custom coders with the SDK before building timers","Keep Beam SDK and runner versions aligned","Test pipelines with timers on a local runner before prism"],"tags":["beam","prism","coder","pipeline"],"backgroundTag":"unsupported-operation","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"}