Error when executing workflows

I’m getting this error on my worker (which is only executing workflows).

2022-05-26T20:37:47.581Z [ERROR] Failed to activate workflow {
  runId: '8095be57-568d-46c2-8d69-29ff8108e600',
  error: TypeError: randomnessSeed.toBytes is not a function
      at /Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:595:72
      at /Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:65:26
      at NoopContextManager.with (/Users/brianlu/testing/.yarn/cache/@opentelemetry-api-npm-1.1.0-7f8c5a33ef-8be8e8dd20.zip/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js:36:24)
      at ContextAPI.with (/Users/brianlu/testing/.yarn/cache/@opentelemetry-api-npm-1.1.0-7f8c5a33ef-8be8e8dd20.zip/node_modules/@opentelemetry/api/build/src/api/context.js:71:54)
      at instrument (/Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:61:29)
      at /Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/worker.js:592:81
      at /Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:65:26
      at NoopContextManager.with (/Users/brianlu/testing/.yarn/cache/@opentelemetry-api-npm-1.1.0-7f8c5a33ef-8be8e8dd20.zip/node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js:36:24)
      at ContextAPI.with (/Users/brianlu/testing/.yarn/cache/@opentelemetry-api-npm-1.1.0-7f8c5a33ef-8be8e8dd20.zip/node_modules/@opentelemetry/api/build/src/api/context.js:71:54)
      at instrument (/Users/brianlu/testing/.yarn/cache/@temporalio-worker-npm-0.23.2-c07b874de2-c8f05a7948.zip/node_modules/@temporalio/worker/lib/tracing.js:61:29),
  workflowExists: false
}

randomnessSeed is a Long that’s deserialized with protobufjs, and the toBytes function should be provided by the long npm package. What’s the output of npm ls long?

I’m using yarn, should I use a diff command?

temporal-workflows@0.0.0 /Users/brianlu/testing/packages/temporal_workflows
└── (empty)

Since I was using yarn, needed to have long listed as a dependency in my package.json in a higher directory, thank you for the help!

1 Like