apache/beam · error · Error

Expected all promises to be resolved

Error message

Expected all promises to be resolved: ${update2}

What it means

After paramProvider.setCurrentValue(wvalue) reported deferred (async) work, the operator awaited the pending promises and then verified all of them resolved; update2 still contained unfulfilled entries. This is an internal invariant guard: the async side-input/state fetches scheduled for this element did not all settle before processing continued.

Solutions

  1. Inspect which promises remain pending (side inputs, state reads) to find the hanging fetch — often a stuck runner state channel.
  2. Report as a Beam SDK bug with the windowed value and transform context, since user code cannot normally leave these unresolved.
  3. Retry the bundle; transient runner/RPC failures can surface here.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at sdks/typescript/src/apache_beam/worker/operators.ts:772 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at sdks/typescript/src/apache_beam/worker/operators.ts:772

      this_.paramProvider.setCurrentValue(undefined);
      return result.build();
    }

    // Update the context with any information specific to this window.
    const updateContextResult = this.paramProvider.setCurrentValue(wvalue);

    // If we were able to do so without any deferred actions, process the
    // element immediately.
    if (updateContextResult === NonPromise) {
      return reallyProcess();
    } else {
      // Otherwise return a promise that first waits for all the deferred
      // actions to complete and then process the element.
      return (async () => {
        await updateContextResult;
        const update2 = this.paramProvider.setCurrentValue(wvalue);
        if (update2 !== NonPromise) {
          throw new Error("Expected all promises to be resolved: " + update2);
        }
        await reallyProcess();
      })();
    }
  }

  async finishBundle() {
    if (this.doFn.finishBundle) {
      const finishBundleOutput = this.doFn.finishBundle(this.augmentedContext);
      if (!finishBundleOutput) {
        return;
      }
      // The finishBundle method must return `void` or a Generator<WindowedValue<OutputT>>. It may not
      // return Generator<OutputT> without windowing information because a single bundle may contain
      // elements from different windows, so each element must specify its window.
      for (const element of finishBundleOutput) {
        const maybePromise = this.receiver.receive(element);
        if (maybePromise !== NonPromise) {

View on GitHub (pinned to 12126d8942)