{"record":{"id":"c242ec3b138a217a","repo":"apache/beam","slug":"transform-with-urn-s-failed-to-parse-s","errorCode":null,"errorMessage":"Transform with URN %s failed to parse: %s","messagePattern":"Transform with URN (.+?) failed to parse: (.+?)","errorType":"exception","errorClass":"java.lang.RuntimeException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/PTransformMatchers.java","lineNumber":533,"sourceCode":"      public boolean matchesDuringValidation(AppliedPTransform<?, ?, ?> application) {\n        return false;\n      }\n\n      @Override\n      public String toString() {\n        return MoreObjects.toStringHelper(\"groupWithShardableStatesMatcher\").toString();\n      }\n    };\n  }\n\n  public static PTransformMatcher writeWithRunnerDeterminedSharding() {\n    return application -> {\n      if (PTransformTranslation.WRITE_FILES_TRANSFORM_URN.equals(\n          PTransformTranslation.urnForTransformOrNull(application.getTransform()))) {\n        try {\n          return WriteFilesTranslation.isRunnerDeterminedSharding((AppliedPTransform) application);\n        } catch (IOException exc) {\n          throw new RuntimeException(\n              String.format(\n                  \"Transform with URN %s failed to parse: %s\",\n                  PTransformTranslation.WRITE_FILES_TRANSFORM_URN, application.getTransform()),\n              exc);\n        }\n      }\n      return false;\n    };\n  }\n}\n","sourceCodeStart":515,"sourceCodeEnd":544,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/PTransformMatchers.java#L515-L544","documentation":"The writeWithRunnerDeterminedSharding matcher checks WriteFiles transforms by calling WriteFilesTranslation.isRunnerDeterminedSharding, which parses the WriteFilesPayload. IOException while parsing is wrapped in this RuntimeException naming WRITE_FILES_TRANSFORM_URN and the offending transform, indicating a malformed or incompatible WriteFiles payload.","triggerScenarios":"Matching an AppliedPTransform with URN beam:transform:WriteFiles whose WriteFilesPayload bytes fail to parse — during runner-determined-sharding handling in pipeline translation.","commonSituations":"Beam version skew between the pipeline-producer and translating SDK; custom file sinks with nonstandard payloads; corrupted serialized pipelines.","solutions":["Upgrade/align the Beam SDK versions of all pipeline producers and the translating runner.","Inspect the failing transform's payload and confirm it parses as RunnerApi.WriteFilesPayload.","Regenerate/re-save the pipeline proto with a consistent SDK version."],"exampleFix":"// before\nthrow new RuntimeException(String.format(\"Transform with URN %s failed to parse: %s\", URN, application.getTransform()), exc);\n// after (same, but ensure producer/consumer SDKs match)\n// mvn versions:set -DnewVersion=<same beam version everywhere>","handlingStrategy":"try-catch","validationCode":"null","typeGuard":null,"tryCatchPattern":"try { matcher.matches(application); } catch (RuntimeException e) { if (e.getCause() instanceof IOException) { /* WriteFilesPayload parse failure */ } throw e; }","preventionTips":["Match SDK versions that write and read pipeline protos","Validate WriteFilesPayload with the same Beam version that wrote it","Re-save pipelines when upgrading Beam"],"tags":["java","proto","translation","write-files"],"backgroundTag":"protobuf-unmarshal-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}