apache/beam · error

Unknown artifact type " +…

Error message

Unknown artifact type " + msg.request.getArtifact.artifact!.typeUrn

What it means

In offerArtifacts, the handler switches on the artifact's typeUrn and only supports the known artifact type URNs (e.g. file/URL/embedded types). Any artifact whose typeUrn is unrecognized falls through to the default case and throws, because the handler cannot fetch or serve artifacts of an unknown type.

Solutions

  1. Upgrade the TypeScript SDK so the runner recognizes the artifact type URN being offered.
  2. Align the pipeline-side staging so it only emits artifact types this runner supports (e.g. package deps as file artifacts).
  3. Check for version skew between the job service and the SDK and pin compatible versions.
  4. If it's a custom type, add a case for its URN in the switch to handle/serve it.
Defensive patterns

Strategy: try-catch

Validate before calling

const KNOWN_URNS = ['beam:artifact:type:file:v1', 'beam:artifact:type:url:v1', 'beam:artifact:type:embedded:v1'];
if (!KNOWN_URNS.includes(artifact.typeUrn)) console.warn('Unsupported artifact type:', artifact.typeUrn);

Try / catch

try {
  await offerArtifacts(stagingClient, token, artifacts);
} catch (e) {
  if ((e as Error).message.startsWith('Unknown artifact type')) {
    // upgrade SDK or re-stage as a supported artifact type
  } else throw e;
}

Prevention

When it happens

Trigger: A job offers an artifact whose typeUrn is not among the URNs handled by this TypeScript runner (e.g. a new artifact type like beam:artifact:type:npm:v1 added by a newer SDK, or a custom/typo'd URN).

Common situations: Version skew between the pipeline/job-service (which stages new artifact types) and an older TypeScript runner SDK; custom artifact types introduced by an extension; a typo in a manually constructed artifact descriptor.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/688e12b4a3c20a22. Report an issue: GitHub.

Appendix: source

Thrown at sdks/typescript/src/apache_beam/runners/artifacts.ts:174

                isLast: false,
                response: {
                  oneofKind: "getArtifactResponse",
                  getArtifactResponse: { data: chunk },
                },
              });
            }
            call.requests.send({
              stagingToken: stagingToken,
              isLast: true,
              response: {
                oneofKind: "getArtifactResponse",
                getArtifactResponse: { data: new Uint8Array() },
              },
            });
            break;

          default:
            throw new Error(
              "Unknown artifact type " +
                msg.request.getArtifact.artifact!.typeUrn,
            );
        }
        break;

      default:
        throw new Error("Unknown request type " + msg.request.oneofKind);
    }
  });

  call.requests.send({
    stagingToken: stagingToken,
    isLast: false,
    response: {
      oneofKind: undefined,
    },
  });

View on GitHub (pinned to 12126d8942)