Skip to content

Calling any server function from the client entry point breaks custom serialization adapters #7706

Description

@roccomaniscalco

Which project does this relate to?

Start

Describe the bug

Calling a server function that uses a custom serialization adapter throws a SerovalDeserializationError when any server function is called from the client entry point (client.tsx).

  1. Define a startInstance with custom serializationAdapters in start.ts
  2. Call any server function from the client entry point
  3. Call a server function that uses a custom serialization adapter
  4. A SerovalDeserializationError occurs

Complete minimal reproducer

https://github.com/roccomaniscalco/tanstack-start-createSerializationAdapter

Steps to Reproduce the Bug

  1. pnpm i && pnpm dev
  2. open localhost:3000
  3. Click "Get Animal" button
  4. Observe SerovalDeserializationError in console

Expected behavior

As a user, I expected custom serialization adapters to deserialize successfully, but instead I am seeing a SerovalDeserializationError.

Screenshots or Videos

No response

Platform

  • Router / Start Version:
    "@tanstack/react-router": "1.170.16",
    "@tanstack/react-start": "1.168.26",
    
  • OS: macOS
  • Browser: Chrome
  • Browser Version: 149.0.7827.156 (Official Build) (arm64)
  • Bundler: vite
  • Bundler Version: ^8.0.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions