Typescript - Failed to Activate Workflow - Workflow Uninitialized

Hi, I am currently developing a Temporal for one of a microservice on my work.

When I start the microservice and start the worker, everything went well and it is said worker is successfully created with bundled path to workflow definition.

But when I trigger the workflow execution, it throws error like this on my service’s terminal output

2023-06-21T01:14:26.227Z [ERROR] Failed to activate workflow {
namespace: ‘loan-transaction’,
workflowId: ‘AHCIA06120118048EC4C-017d340d-6cbd-4e3b-8e3e-647cb48f2622’,
runId: ‘b14f5e1d-88f1-4502-be96-3a34305bda30’,
workflowType: ‘workflowName’,
error: /workflow-bundle-3a5aa1c9b164f7a08aa7.js:3071
throw new common_1.IllegalStateError(‘Workflow uninitialized’);

IllegalStateError: Workflow uninitialized

any idea or pointers why this error is happening?

for additional context: i am using @temporalio Typescript SDK version 1.5.2

thank you


I have a feeling you have multiple incompatible versions of the SDK packages installed.
Can you run npm why @temporalio/workflow please?

And please upgrade to the latest SDK version (1.7.4 at the time of writing), we’ve made the intra package dependencies stricter.

Hi, thank you for replying. Sorry for the late response.

Yes, I have tried your suggestion to run npm why @temporalio/workflow. As you have suspected there are 2 different version installed on my machine, because I am importing some common functionality from our internally maintained library. So after I match the version it works.

Noted for the suggestion for upgrading. Initially we’ve tried to install the latest version, but some of the dependencies were incompatible with ours. Might need to resolve it in the future.