Solid Suspense is triggered on data access after checking isSuccess when loaded by ensureQueryData
I maintainer di solito rispondono entro 1 giorno
@brenelz ci sta già lavorando.
Dal 18/8/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Inizia eseguendo la riproduzione StackBlitz e ispeziona src/routes/posts.tsx, prima con la sezione loader commentata e poi abilitata. Traccia come ensureQueryData influisce sulla Solid resource e sul query data getter quando isSuccess è true. Il lavoro è completo quando il data getter si comporta in modo coerente in entrambi i casi e il Suspense fallback non viene montato inaspettatamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Hi there, I'm running into a weird issue where a suspense is being triggered even after checking that isSuccess is true, but only if the data was loaded from an ensureQueryData call (I've only tested this from a createFileRoute loader, maybe that's somehow related?).
It seems like somehow the Solid resource ends up behind the query. I'm not very familiar with the TanStack or Solid code, but in digging through the debugger in Chrome I found this suspect situation. The getter on the query identifies that the data exists (and while I'm here I can see the isSuccess set to true) and tries to load the latest data from the Solid resource:
But the Solid resource doesn't believe the fetcher was resolved yet, leading to it triggering a read which adds to the suspense context instead of just returning the value:
Your minimal, reproducible example
https://stackblitz.com/edit/tanstack-router-lwma9xac?file=src%2Froutes%2Fposts.tsx
Steps to reproduce
- Visit the posts page (/posts) in the sandbox, and observe that the
wasMountedsignal remains false. - Uncomment the loader section (in src/routes/posts.tsx), and observe that the Suspense fallback is mounted.
Expected behavior
I expect that the query data getter would behave the same no matter how the data was initially loaded.
How often does this bug happen?
Every time
Screenshots or Videos
Platform
- OS: macOS
- Browser: Safari 26.1, Chrome 142.0
Tanstack Query adapter
solid-query
TanStack Query version
5.90.12
TypeScript version
5.9.3
Additional context
I realize this seems like a tiny bug, and in almost any case I don't think it'd even be perceptible, but unfortunately the suspense is a significant problem for me because it breaks the iframe that Square's web payments SDK generates.
- Lingua principale
- TypeScript
- Stelle
- 50.4k
- Fork
- 4.2k
- Merge medio
- 7h 29m
- PR unite (30g)
- 393
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/query
-
solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TanStack/query#11358 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
solid-query: switching the queryClient accessor strands the new client's cache (subscription stays on the old observer)Forse già presa @MaNaN1803 l’ha presa 76 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TanStack/query#11106 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
restoreQueries and persisterGc throw on malformed persisted entriesForse già presa @VGontier-cmd l’ha presa 1 giorno fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
setQueryData: NoInfer loses discriminated-union members when spreading a narrowed updater valueForse già presa @iosayin l’ha presa 2 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TanStack/query
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] remember() with special characters in namespace hangs until timeout instead of returning 400Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
MystenLabs/MemWal#1133 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug user-priority/P2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Effect-TS/effect#8881 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno