I’m currently experiencing an issue with Temporal while running a workflow. Sometimes the workflow initializes successfully and returns the expected response, but other times, it fails to initialize with the following error:
{
"message": "Failed to initialize workflow of type 'exampleWorkflow': no such function is exported by the workflow bundle",
"source": "TypeScriptSDK",
"stackTrace": "/app/workflow-bundle-e9a66834c03d4f699335.js:17886\n throw new TypeError(`Failed to initialize workflow of type '${activator.info.workflowType}': ${details}`);\n ^\n\nTypeError: Failed to initialize workflow of type 'exampleWorkflow': no such function is exported by the workflow bundle\n at Object.initRuntime (/app/node_modules/@temporalio/workflow/src/worker-interface.ts:87:10)\n at evalmachine.<anonymous>:1:18"
}
It seems like the workflow task is failing intermittently. The error suggests that the function is not exported by the workflow bundle. After the failure, the system attempts to loop back and reinitialize the workflow, but this does not consistently resolve the issue.
Steps I’ve Taken:
- Removed all containers and rebuilt the project from scratch.
- Verified my workflow bundle to ensure the function is properly exported.
- Confirmed that the workflow name in the initialization matches the exported function in the bundle.
Despite these efforts, the issue persists sporadically.
My Setup:
- Stack: TypeScript with Node.js
- Development Environment: [kubernets]
Temporal Server: http://docker.io/temporalio/server:1.24.2
Temporal Web : docker.io/temporalio/ui:2.28.0
Additional Context:
The issue might be related to how the workflow bundle is being generated or loaded. I’ve verified that other workflows in the same project are working fine, so it seems specific to this workflow or its initialization process.
Any insights or suggestions on how to debug or resolve this issue would be greatly appreciated! Thank you in advance for your help.