apache/beam · error · Error

Timers not yet supported.

Error message

Timers not yet supported.

What it means

The TypeScript Beam worker's data layer creates a channel whose sendTimers method is a stub. Timers were never sent to this channel by design (the comment: 'Should never get here if we never send timers'), so any call is treated as an internal invariant violation and throws.

Solutions

  1. Remove timer usage (windowed state/timers) from the TypeScript pipeline until supported.
  2. Check for an SDK/runner upgrade that adds timer support and use it.
  3. If timers are required, implement the pipeline in the Python/Java SDK instead.

Example fix

// before (inside a stateful DoFn)
this.setTimer("expiry", ...); // unsupported in TS worker data channel
// after
// drop the timer; use window-triggered logic or process in a Java/Python pipeline
Defensive patterns

Strategy: validation

Validate before calling

// guard: don't register timers when targeting the TS worker
const useTimers = /* feature flag */ false;
if (useTimers) throw new Error("Timers unsupported in TS worker; use Java/Python SDK");

Try / catch

try {
  await runPipeline(p);
} catch (e) {
  if (e.message === "Timers not yet supported.") {
    // fall back to non-timer pipeline design
  }
}

Prevention

When it happens

Trigger: A pipeline/transform registered a timer (via setTimer from the transform API) while the data channel was built without timer support, causing sendTimers to be invoked during bundle execution.

Common situations: Using the experimental TypeScript SDK with a pipeline that uses stateful DoFns with timers; a runner/worker combination where timer channels were not wired up; SDK limitation not yet implemented.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at sdks/typescript/src/apache_beam/worker/data.ts:135

    const this_ = this;
    return {
      sendData: function (data: Uint8Array) {
        this_.dataChannel.write({
          data: [
            {
              instructionId: bundleId,
              transformId: transformId,
              data: data,
              isLast: false,
            },
          ],
          timers: [],
        });
        return Promise.resolve();
      },
      sendTimers: function (timerFamilyId: string, timers: Uint8Array) {
        // Should never get here if we never send timers.
        throw Error("Timers not yet supported.");
      },
      close: function () {
        this_.dataChannel.write({
          data: [
            {
              instructionId: bundleId,
              transformId: transformId,
              data: new Uint8Array(),
              isLast: true,
            },
          ],
          timers: [],
        });
      },
      onError: function (error: Error) {
        throw error;
      },
    };

View on GitHub (pinned to 12126d8942)