Solid Suspense is triggered on data access after checking isSuccess when loaded by ensureQueryData
Maintainer antworten meist innerhalb von 1 Tag
@brenelz arbeitet bereits daran.
Seit 18.8.2026.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 52/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- typescript
- Bereich
- frontend
Rechercherichtung
Führe zunächst die StackBlitz-Reproduktion aus und untersuche src/routes/posts.tsx, zuerst mit auskommentiertem loader-Abschnitt und anschließend mit aktiviertem loader-Abschnitt. Verfolge, wie ensureQueryData die Solid resource und den query data getter beeinflusst, wenn isSuccess true ist. Als erledigt gilt die Aufgabe, wenn sich der data getter in beiden Fällen konsistent verhält und der Suspense fallback nicht unerwartet gemountet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 50.4k
- Forks
- 4.2k
- Ø Merge
- 6 Std. 55 Min.
- Gemergte PRs (30 T.)
- 390
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TanStack/query
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
TanStack/query#11930 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
solid-query: STRICT_READ_UNTRACKED on Solid 2 — client()/options() read in component body (useMutation, useBaseQuery)Evtl. wieder frei @LeonxLJX hat das vor 35 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
TanStack/query#11358 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
solid-query: switching the queryClient accessor strands the new client's cache (subscription stays on the old observer)Evtl. vergeben @MaNaN1803 hat das vor 78 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
TanStack/query#11106 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
restoreQueries and persisterGc throw on malformed persisted entriesEvtl. vergeben @VGontier-cmd hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
[Feature]: [P3] engine-rs: the package source hash should ignore line endings and untracked filesOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
maniator/verticopolis#880 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
siyuan-note/siyuan#20353 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
black-forest-labs/skills#17 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Albert-Weasker/niubigeo#168 ·
Maintainer antworten meist innerhalb von 1 Tag