Skip to content

Error: Invalid server function ID: e6a1d855ce20cce25203f1696835eff25f0397b6748290435bb5cbc995e43448 #6423

@fyezz

Description

@fyezz

Which project does this relate to?

Start

Describe the bug

I recently encountered this problem with tanstart in development environment. The same problem occurred in release/prod environment.

Server function calls actually worked.
Please take a look ASAP. I have a web app that is almost ready for production.
Unfortunately I cannot share the code base.
Thanks.

Package versions are :

    "@tanstack/react-query": "^5.90.19",
    "@tanstack/react-router": "^1.151.6",
    "@tanstack/react-start": "^1.153.0",
    "@tanstack/router-core": "^1.151.6",

Errors in dev:

Error: Invalid server function ID: e6a1d855ce20cce25203f1696835eff25f0397b6748290435bb5cbc995e43448
    at LoadPluginContext._formatLog (file:///project_xxx/node_modules/vite/dist/node/chunks/config.js:28998:43)
    ... 4 lines matching cause stack trace ...
    at async loadAndTransform (file:///project_xxx/node_modules/vite/dist/node/chunks/config.js:22627:21) {
  cause: Error: Invalid server function ID: e6a1d855ce20cce25203f1696835eff25f0397b6748290435bb5cbc995e43448
      at LoadPluginContext._formatLog (file:///project_xxx/node_modules/vite/dist/node/chunks/config.js:28998:43)
      at LoadPluginContext.error (file:///project_xxx/node_modules/vite/dist/node/chunks/config.js:28995:14)
      at LoadPluginContext.handler (file:///project_xxx/node_modules/@tanstack/start-plugin-core/dist/esm/start-compiler-plugin/plugin.js:261:16)
      at EnvironmentPluginContainer.load (file:///project_xxx/node_modules/vite/dist/node/chunks/config.js:28758:56)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async loadAndTransform (file:///project_xxx/node_modules/vite/dist/node/chunks/config.js:22627:21) {
    plugin: 'tanstack-start-core:validate-server-fn-id',
    runnerError: Error: RunnerError
        at reviveInvokeError (file:///project_xxx/node_modules/vite/dist/node/module-runner.js:476:64)
        at Object.invoke (file:///project_xxx/node_modules/vite/dist/node/module-runner.js:549:11)
        at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
        at async ModuleRunner.getModuleInformation (file:///project_xxx/node_modules/vite/dist/node/module-runner.js:1086:7)
        at async request (file:///project_xxx/node_modules/vite/dist/node/module-runner.js:1103:83)
        at async getServerFnById (/project_xxx/#tanstack-start-server-fn-resolver:4:15)
        at async handleServerAction (/project_xxx/node_modules/@tanstack/start-server-core/src/server-functions-handler.ts:57:18)
        at async next (/project_xxx/node_modules/@tanstack/start-server-core/src/createStartHandler.ts:165:16)
        at async startRequestResolver (/project_xxx/node_modules/@tanstack/start-server-core/src/createStartHandler.ts:314:21)
        at async Object.fetch (/project_xxx/node_modules/@tanstack/react-start/dist/plugin/default-entry/server.ts:16:14)
        at async file:///project_xxx/node_modules/@tanstack/start-plugin-core/dist/esm/dev-server-plugin/plugin.js:112:30
  },
  status: 500,
  statusText: undefined,
  headers: undefined,
  data: undefined,
  body: undefined,
  unhandled: true
}

Error in release/prod:

Error: Server function info not found for eyJmaWxlIjoiL0BpZC9zcmMvbGliL2RhdGEtbG9hZGVycy50c3g_dHNzLXNlcnZlcmZuLXNwbGl0IiwiZXhwb3J0IjoiZ2V0QnVpbGRJZF9jcmVhdGVTZXJ2ZXJGbl9oYW5kbGVyIn0
    at getServerFnById (file:///project_xxx/.output/server/chunks/virtual/entry.mjs:902:11)
    ... 8 lines matching cause stack trace ...
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  cause: Error: Server function info not found for eyJmaWxlIjoiL0BpZC9zcmMvbGliL2RhdGEtbG9hZGVycy50c3g_dHNzLXNlcnZlcmZuLXNwbGl0IiwiZXhwb3J0IjoiZ2V0QnVpbGRJZF9jcmVhdGVTZXJ2ZXJGbl9oYW5kbGVyIn0
      at getServerFnById (file:///project_xxx/.output/server/chunks/virtual/entry.mjs:902:11)
      at handleServerAction (file:///project_xxx/.output/server/chunks/virtual/entry.mjs:939:24)
      at file:///project_xxx/.output/server/chunks/virtual/entry.mjs:1362:19
      at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
      at runWithStartContext (file:///project_xxx/.output/server/chunks/virtual/entry.mjs:355:23)
      at serverFnHandler (file:///project_xxx/.output/server/chunks/virtual/entry.mjs:1354:18)
      at next (file:///project_xxx/.output/server/chunks/virtual/entry.mjs:1267:22)
      at executeMiddleware (file:///project_xxx/.output/server/chunks/virtual/entry.mjs:1286:10)
      at startRequestResolver (file:///project_xxx/.output/server/chunks/virtual/entry.mjs:1372:28)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5),
  status: 500,
  statusText: undefined,
  headers: undefined,
  data: undefined,
  body: undefined,
  unhandled: true
}

Your Example Website or App

n/a

Steps to Reproduce the Bug or Issue

n/a

Expected behavior

n/a

Screenshots or Videos

No response

Platform

Linux unbuntu 22.4
Node version: 22

Packages:

    "@tanstack/react-query": "^5.90.19",
    "@tanstack/react-router": "^1.151.6",
    "@tanstack/react-start": "^1.153.0",
    "@tanstack/router-core": "^1.151.6",

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions