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).
- Define a
startInstance with custom serializationAdapters in start.ts
- Call any server function from the client entry point
- Call a server function that uses a custom serialization adapter
- A
SerovalDeserializationError occurs
Complete minimal reproducer#
https://github.com/roccomaniscalco/tanstack-start-createSerializationAdapter
Steps to Reproduce the Bug#
pnpm i && pnpm dev
- open localhost:3000
- Click "Get Animal" button
- 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#
Additional context#
No response
Same bug from a different trigger: oidc-spa's
bootstrapOidc(10.x), called at module top level as its docs show, makes a server function call to read env vars while the route tree loads. That is beforehydrateStartsetswindow.__TSS_START_OPTIONS__, soserverFnFetchercaches a plugin list without the app's adapters for the life of the page. Every later response carrying a custom-adapter value fails withMissing plugin for tag "$TSR/t/<key>". It reproduces on@tanstack/react-start1.168.49, andstart-client-core1.170.34 still has the same cache. Our workaround seedswindow.__TSS_START_OPTIONS__ ??= { serializationAdapters }instart.ts, whichhydrateStartimports beforegetRouter. #7708 would fix this for us.