apache/beam · error · IllegalStateException
translated with URN ' ' but payload was not a
Error message
%s translated %s with URN '%s' but payload was not a %s
What it means
WindowIntoTranslation.getWindowIntoPayload() parses the payload of a PTransform whose URN is ASSIGN_WINDOWS, expecting a serialized WindowIntoPayload protobuf. If protobuf parsing fails (InvalidProtocolBufferException), it throws this IllegalStateException indicating the transform that claimed to be a window-assignment transform has a payload of the wrong type.
Solutions
- Regenerate/retranslate the pipeline with the same Beam SDK version so the payload is a proper WindowIntoPayload.
- Verify no code manually writes PTransform specs with the assign-windows URN and a foreign payload.
- Check runner/SDK version compatibility; upgrade the runner harness to a matching Beam version.
- Inspect the failing transform's spec payload bytes to identify what actually got serialized.
Example fix
// before: manually building an assign-windows transform with a foreign payload
PTransform.newBuilder().setSpec(FunctionSpec.newBuilder().setUrn(ASSIGN_WINDOWS_URN)
.setPayload(anyOtherProtoBytes)).build();
// after: let translation build it from WindowInto
pc.apply(Window.into(FixedWindows.of(Duration.standardMinutes(1)))); Defensive patterns
Strategy: try-catch
Validate before calling
// Validate the transform proto payload parses before translating
try {
WindowIntoPayload.parseFrom(transformProto.getSpec().getPayload());
} catch (InvalidProtocolBufferException e) {
throw new IllegalStateException("Assign-windows transform payload is not a WindowIntoPayload", e);
} Try / catch
try {
strategy = WindowingStrategyTranslation.fromProto(windowingStrategyProto);
} catch (IllegalStateException e) {
if (String.valueOf(e.getMessage()).contains("payload was not a")) {
// regenerate/retranslate the pipeline with a matching Beam version
}
throw e;
} Prevention
- Never hand-craft PTransform specs with the assign-windows URN and foreign payloads.
- Keep runner and SDK Beam versions aligned so translation round-trips cleanly.
- Avoid mutating pipeline protos after submission.
- Test custom runners against standard SDK-generated pipeline protos.
When it happens
Trigger: Rehydrating a pipeline proto (e.g. a runner reading a submitted job graph, or BeamFnApi translation) where the transform with URN 'beam:transform:assign_windows:v1' has a spec payload that is not a valid serialized WindowIntoPayload — corrupted graph, hand-crafted proto, or a runner/SDK version mismatch producing a different payload message.
Common situations: Custom runners deserializing job protos produced by a different Beam version; pipelines built/modified programmatically that put the wrong payload into an assign-windows PTransform; corrupted job submissions.
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
- Aliased enumerations not currently supported.
- Any not yet supported
- Attempted to get side input window for GlobalWindow from…
- Attempted to get side input window for GlobalWindow from…
- BoundedWindow unsupported in
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/d55088a06bb43cad.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/WindowIntoTranslation.java:93
transformProto =
PTransformTranslation.toProto(application, Collections.emptyList(), components);
} catch (IOException exc) {
throw new RuntimeException(exc);
}
checkArgument(
PTransformTranslation.ASSIGN_WINDOWS_TRANSFORM_URN.equals(
transformProto.getSpec().getUrn()),
"Illegal attempt to extract %s from transform %s with name \"%s\" and URN \"%s\"",
Window.Assign.class.getSimpleName(),
application.getTransform(),
application.getFullName(),
transformProto.getSpec().getUrn());
try {
return WindowIntoPayload.parseFrom(transformProto.getSpec().getPayload());
} catch (InvalidProtocolBufferException exc) {
throw new IllegalStateException(
String.format(
"%s translated %s with URN '%s' but payload was not a %s",
PTransformTranslation.class.getSimpleName(),
application,
PTransformTranslation.ASSIGN_WINDOWS_TRANSFORM_URN,
WindowIntoPayload.class.getSimpleName()),
exc);
}
}
public static @Nullable WindowFn<?, ?> getWindowFn(AppliedPTransform<?, ?, ?> application) {
return WindowingStrategyTranslation.windowFnFromProto(
getWindowIntoPayload(application).getWindowFn());
}
/** A {@link PTransformTranslation.TransformPayloadTranslator} for {@link Window}. */
public static class WindowIntoPayloadTranslator
implements PTransformTranslation.TransformPayloadTranslator<Window.Assign<?>> {View on GitHub (pinned to 12126d8942)