Skip to content

Solid Query breaks Astro SSR #9713

@li-kai

Description

@li-kai

Describe the bug

When QueryClientProvider during SSR within a component that uses Solid Query, the render crashes, the server doesn't respond. 30 seconds later, a "renderToString timed out" message is shown.

Your minimal, reproducible example

https://stackblitz.com/edit/github-pqy8j7-h5azxugy?file=src%2Fcomponents%2FSolidApp.tsx

Steps to reproduce

  1. Open the link
  2. Wait until the container starts, dependencies are installed.
  3. You are shown a blank page.
  4. Wait for a 30 second timeout.
  5. "renderToString timed out" is shown in the console and in the preview window.

Expected behavior

The app should render. Here's Solid Query 5.85.4:

https://stackblitz.com/edit/github-pqy8j7-h8ay4ze9?file=src%2Fcomponents%2FSolidApp.tsx

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Tanstack Query adapter

solid-query

TanStack Query version

v5.58.5

TypeScript version

No response

Additional context

As a workaround, enabling experimental_prefetchInRender: true fixes rendering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions