Skip to content

Cannot read properties of undefined (reading 'getStreamedValue') #4244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
enmanuelmag opened this issue May 22, 2025 · 3 comments
Open

Cannot read properties of undefined (reading 'getStreamedValue') #4244

enmanuelmag opened this issue May 22, 2025 · 3 comments

Comments

@enmanuelmag
Copy link

enmanuelmag commented May 22, 2025

Describe the bug

If I use useQuery hook always throw an error Cannot read properties of undefined (reading 'getStreamedValue'). Even a dummy hook without external fetch. Mutation works all good.

Your minimal, reproducible example

https://codesandbox.io/p/github/DeltaTypes/vch-kpi-platform/feat/vechiel-template-form-xlsx

Steps to reproduce

  1. Go to app folder
  2. Up docker compose docker-compose up -d
  3. Execute npm run db:migrate-dev
  4. Execute npm run prisma:seed
  5. Login with a Admin user (see Seed folder for admin seed)
  6. Go to Fleet tab on Header
  7. See the error

Expected behavior

Use of useQuery without any error as useMutation works.

How often does this bug happen?

Every time

Screenshots or Videos

Image

Platform

Windows

Browser: Vivaldi and Google Chrome

Tanstack Query adapter

None

TanStack Query version

latest

TypeScript version

^5.7.2

Additional context

No response

@enmanuelmag
Copy link
Author

Searching deep on the base code. I noted that the error raise on t Object._experimental_beforeQuery call, under useBaseQuery.

@enmanuelmag
Copy link
Author

I created a entire new project and now works. The strange is that I created this project using Vite create and all setup comes directly from template.

@TkDodo
Copy link
Contributor

TkDodo commented May 24, 2025

Unable to access this workspace

your reproduction is private, so I can’t access it.

anyways, my guess is that you are using TansTack Start, as it’s the only place where experimental_beforeQuery is used.

const dehydratedClient = router.clientSsr!.getStreamedValue<any>(

I’m transferring this to the router repo. @schiller-manuel FYI

@TkDodo TkDodo transferred this issue from TanStack/query May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants