# DataCloneError from workflowInfo sink parameter

**URL:** <https://community.temporal.io/t/datacloneerror-from-workflowinfo-sink-parameter/9648>\
**Category:** Community Support\
**Tags:** general-impl, logging, metrics, typescript-sdk\
**Created:** [September 28, 2023, 6:29pm UTC](https://community.temporal.io/t/datacloneerror-from-workflowinfo-sink-parameter/9648 "2023-09-28T18:29:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hannahb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/hannahb/32/4364_2.png) [@hannahb](https://community.temporal.io/u/hannahb)\
**Post date:** [September 28, 2023, 6:29pm UTC](https://community.temporal.io/t/datacloneerror-from-workflowinfo-sink-parameter/9648/1 "2023-09-28T18:29:46Z")

</div>

Temporal server version 1.21.4  
using Typescript SDK  
@temporalio - 1.7.0  
using node 16

Hello,

I’m trying to implement a sink, but when calling the sink function, I keep getting a `DataCloneError`

This seems to come from the first parameter of type WorkflowInfo for all sink functions. I tried my own custom sink, the example alert sink, and only the defaultLoggerSink.

The `unsafe` property of `WorkFlowInfo`, type `UnsafeWorkflowInfo` has a property `now()`. When `postMessage` is called, it tries to serialize `{ isReplaying: false, now: [Function: now] }` which seems to cause the above error.

Not sure if I could be missing a step. I also tried following the example here [https://github.com/temporalio/samples-typescript/blob/main/sinks/src/workflows.ts](https://github.com/temporalio/samples-typescript/blob/main/sinks/src/workflows.ts) and kept it all in one file but still had this error.

my sink:

```auto
import { proxySinks, LoggerSinks, Sinks } from "@temporalio/workflow";

export interface CustomSinks extends Sinks {
  tracer: { trace(): void };
  logger: { log(): void };
}

export type WorkerSinks = CustomSinks & LoggerSinks;

```

creating the worker:

```auto
(async () => {
  const sinks: InjectedSinks<WorkerSinks> = {
    ...defaultSinks(),
    tracer: {
      trace: {
        fn() {
          return;
        },
      },
    },
    logger: {
      log: {
        fn(workflowInfo) {
          return;
        },
        callDuringReplay: true,
      },
    },
  };

  //bundling code omitted

  const connection = await NativeConnection.connect({
    address: TEMPORAL_SERVER_ADDRESS,
  });

  const worker = await Worker.create({
    bundlerOptions,
    ...workflowCode,
    activities,
    taskQueue: TEMPORAL_WORKER_QUEUE,
    sinks,
    connection,
  });
  await worker.run();
})();

```

workflow:

```auto
const { logger } = proxySinks<WorkerSinks>();

export async function myWorkflow(
  reqContext: ReqContext,
  request: workflowArgs
) {
  logger.log(); 
  ...

```

---

<div class="post-metadata">

**Author:** ![hannahb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/hannahb/32/4364_2.png) [@hannahb](https://community.temporal.io/u/hannahb)\
**Post date:** [September 29, 2023, 8:22pm UTC](https://community.temporal.io/t/datacloneerror-from-workflowinfo-sink-parameter/9648/2 "2023-09-29T20:22:16Z")

</div>

This seems to have been resolved after updating @temporalio/worker. it looks like I had both 1.7.0 and 1.8.2 installed. Not the full answer but this seems to have been the cause
