{"record":{"id":"d7202af4d4a3012d","repo":"apache/beam","slug":"expected-all-promises-to-be-resolved-update2","errorCode":null,"errorMessage":"Expected all promises to be resolved: ${update2}","messagePattern":"Expected all promises to be resolved: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdks/typescript/src/apache_beam/worker/operators.ts","lineNumber":772,"sourceCode":"      this_.paramProvider.setCurrentValue(undefined);\n      return result.build();\n    }\n\n    // Update the context with any information specific to this window.\n    const updateContextResult = this.paramProvider.setCurrentValue(wvalue);\n\n    // If we were able to do so without any deferred actions, process the\n    // element immediately.\n    if (updateContextResult === NonPromise) {\n      return reallyProcess();\n    } else {\n      // Otherwise return a promise that first waits for all the deferred\n      // actions to complete and then process the element.\n      return (async () => {\n        await updateContextResult;\n        const update2 = this.paramProvider.setCurrentValue(wvalue);\n        if (update2 !== NonPromise) {\n          throw new Error(\"Expected all promises to be resolved: \" + update2);\n        }\n        await reallyProcess();\n      })();\n    }\n  }\n\n  async finishBundle() {\n    if (this.doFn.finishBundle) {\n      const finishBundleOutput = this.doFn.finishBundle(this.augmentedContext);\n      if (!finishBundleOutput) {\n        return;\n      }\n      // The finishBundle method must return `void` or a Generator<WindowedValue<OutputT>>. It may not\n      // return Generator<OutputT> without windowing information because a single bundle may contain\n      // elements from different windows, so each element must specify its window.\n      for (const element of finishBundleOutput) {\n        const maybePromise = this.receiver.receive(element);\n        if (maybePromise !== NonPromise) {","sourceCodeStart":754,"sourceCodeEnd":790,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/typescript/src/apache_beam/worker/operators.ts#L754-L790","documentation":"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.","triggerScenarios":"Thrown at sdks/typescript/src/apache_beam/worker/operators.ts:772 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect which promises remain pending (side inputs, state reads) to find the hanging fetch — often a stuck runner state channel.","Report as a Beam SDK bug with the windowed value and transform context, since user code cannot normally leave these unresolved.","Retry the bundle; transient runner/RPC failures can surface here."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}