Skip to content

Fails to serialize @kubernetes/client-node objects #73

@itmecho

Description

@itmecho

Hi! I've been playing to a tool for work which uses @tanstack/start and I've run into an issue where it can't serialize a response from the @kubernetes/client-node package.

I'm listing deployments and then trying to return that from a server function but I get a serialization error from this library.

This is the error I'm getting:

Serialization error: x [Error]: Seroval Error (specific: 1)
    at Da (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:31650)
    at Fa (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:31859)
    at E (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:32269)
    at ba (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:28374)
    at va (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:28437)
    at Fa (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:31707)
    at E (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:32269)
    at G (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:32848)
    at Object.Ta (file:///Users/REDACTED/node_modules/.pnpm/seroval@1.5.1/node_modules/seroval/dist/esm/production/index.mjs:3:29776)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
  value: V1Deployment {
    metadata: V1ObjectMeta {
      annotations: [Object],
      creationTimestamp: 2021-02-23T08:12:21.000Z,
      generation: 1788,
      labels: [Object],
      name: 'some-deployment',
      namespace: 'default',
      resourceVersion: '111111111',
      uid: 'b73a7178-4b97-46a7-a85d-dc6f4870aaa1'
    },
    spec: V1DeploymentSpec {
      progressDeadlineSeconds: 600,
      replicas: 1,
      revisionHistoryLimit: 10,
      selector: [V1LabelSelector],
      strategy: [V1DeploymentStrategy],
      template: [V1PodTemplateSpec]
    },
    status: V1DeploymentStatus {
      availableReplicas: 1,
      conditions: [Array],
      observedGeneration: 1788,
      readyReplicas: 1,
      replicas: 1,
      updatedReplicas: 1
    }
  }
}

I've tried increasing node's memory but that hasn't changed anything. I have a feeling it's where one of the values already contains stringified JSON as it seems to get further into the structure if I blank out the annotations in the metadata field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions